{"id":213440,"date":"2024-03-11T14:04:49","date_gmt":"2024-03-11T14:04:49","guid":{"rendered":"https:\/\/www.ninjaone.com\/?post_type=script_hub&#038;p=213440"},"modified":"2024-03-11T14:04:49","modified_gmt":"2024-03-11T14:04:49","slug":"powershell-fond-ecran-windows","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/fr\/script-hub\/powershell-fond-ecran-windows\/","title":{"rendered":"Script PowerShell\u00a0: comment rationaliser la gestion des fonds d&rsquo;\u00e9cran dans Windows"},"content":{"rendered":"<h2>Principaux points \u00e0 retenir<\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><strong>Automatise les changements de fonds d\u2019\u00e9cran<\/strong> : le script automatise le processus de d\u00e9finition des fonds d&rsquo;\u00e9cran pour plusieurs profils d&rsquo;utilisateurs dans les environnements Windows.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><strong>Permet de gagner du temps et d&rsquo;assurer une coh\u00e9rence<\/strong> : id\u00e9al pour les professionnels de l&rsquo;informatique et les MSP qui g\u00e8rent plusieurs ordinateurs, afin de garantir l&rsquo;uniformit\u00e9 et la conformit\u00e9 de la marque.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><strong>Des param\u00e8tres flexibles<\/strong> : permet de personnaliser les param\u00e8tres de l&rsquo;URL de l&rsquo;image, du r\u00e9pertoire de stockage et du style de fond d&rsquo;\u00e9cran.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"4\" data-aria-level=\"1\"><strong>Des fonctionnalit\u00e9s \u00e0 effet imm\u00e9diat<\/strong> : inclut des options pour remplacer les fichiers de fond d&rsquo;\u00e9cran transcod\u00e9s et red\u00e9marrer Explorer pour une modification imm\u00e9diate.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"5\" data-aria-level=\"1\"><strong>Adapt\u00e9 aux diff\u00e9rentes versions de Windows<\/strong> : con\u00e7u pour Windows 7 et les versions plus r\u00e9centes, bien que certaines caract\u00e9ristiques puissent varier dans les versions plus anciennes.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"6\" data-aria-level=\"1\"><strong>Une prise en charge des formats d&rsquo;image courants<\/strong> : compatible avec les formats d&rsquo;image les plus courants tels que JPG, PNG, BMP et GIF.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"7\" data-aria-level=\"1\"><strong>Questions relatives \u00e0 la s\u00e9curit\u00e9<\/strong> : implique la modification des param\u00e8tres de la base de registre et des fichiers syst\u00e8me ; une bonne gestion des autorisations de script est cruciale.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"8\" data-aria-level=\"1\"><strong>Des tests complets sont recommand\u00e9s<\/strong> : effectuez des tests approfondis dans des environnements contr\u00f4l\u00e9s avant le d\u00e9ploiement \u00e0 l&rsquo;\u00e9chelle du r\u00e9seau.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"9\" data-aria-level=\"1\"><strong>S&rsquo;int\u00e8gre aux outils de gestion informatique<\/strong> : peut \u00eatre int\u00e9gr\u00e9 de mani\u00e8re transparente dans des plateformes de gestion informatique telles que NinjaOne pour un d\u00e9ploiement et une surveillance efficaces.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"10\" data-aria-level=\"1\"><strong>Documentez et v\u00e9rifiez l&rsquo;utilisation des scripts<\/strong> : maintenez des journaux concernant l&rsquo;utilisation de scripts afin de faciliter l&rsquo;audit et le d\u00e9pannage.<\/li>\n<\/ul>\n<p>La modification du fond d&rsquo;\u00e9cran de plusieurs profils d&rsquo;utilisateurs dans un environnement Windows est une t\u00e2che \u00e0 laquelle les professionnels de l&rsquo;informatique sont souvent confront\u00e9s. Que ce soit \u00e0 des fins d&rsquo;image de marque, de conformit\u00e9 ou simplement pour changer un peu l&rsquo;espace de travail, l&rsquo;automatisation de ce processus permet de gagner du temps et d&rsquo;assurer une coh\u00e9rence. Les scripts PowerShell sont devenus des outils indispensables dans la bo\u00eete \u00e0 outils informatique, offrant des solutions puissantes et flexibles pour de telles t\u00e2ches.<\/p>\n<h2>Contexte<\/h2>\n<p>Le script en question est con\u00e7u pour automatiser le processus de d\u00e9finition des fonds d&rsquo;\u00e9cran pour tous les profils d&rsquo;utilisateurs sur un syst\u00e8me Windows. Cette capacit\u00e9 est particuli\u00e8rement pr\u00e9cieuse pour les professionnels de l&rsquo;informatique et les <a href=\"https:\/\/www.ninjaone.com\/fr\/quest-ce-quun-msp\/\">fournisseurs de services g\u00e9r\u00e9s (MSP)<\/a> qui g\u00e8rent un grand nombre d&rsquo;ordinateurs. Il permet d\u2019uniformiser les environnements d&rsquo;entreprise, garantissant que tous les utilisateurs ont le m\u00eame fond d\u2019\u00e9cran, ce qui peut \u00eatre vital pour l&rsquo;image de marque ou la transmission d&rsquo;informations importantes.<\/p>\n<h2>Le script PowerShell\u00a0:<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">&lt;#\r\n.SYNOPSIS\r\n    This sets the desktop wallpaper for all existing users (if run as System) or the currently logged-in user. To have the wallpaper change take effect immediately please select \"Replace Transcoded Wallpaper File\" and \"Restart Explorer\". These options may not work on Windows 7 and Server 2008.\r\n.DESCRIPTION\r\n    This sets the desktop wallpaper for all existing users (if run as System) or the currently logged-in user. \r\n    To have the wallpaper change take effect immediately please select \"Replace Transcoded Wallpaper File\" and \"Restart Explorer\". \r\n    These options may not work on Windows 7 and Server 2008.\r\n.EXAMPLE\r\n    (No Parameters) - Windows 10\r\n\r\n    C:ProgramDataNinjaRMMAgentscriptingcustomscript_gen_55.ps1 : No image given!\r\n    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException\r\n    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,customscript_gen_55.ps1\r\n\r\nPARAMETER: -Url \"https:\/\/www.example.com\/image.png\"\r\n    A link to the wallpaper you would like to set.\r\n\r\nPARAMETER: -Directory \"C:ExampleExample\"\r\n    A location to store the wallpaper.\r\n\r\n.EXAMPLE\r\n    -Url \"https:\/\/www.microsoft.com\/en-us\/microsoft-365\/blog\/wp-content\/uploads\/sites\/2\/2021\/06\/Msft_Nostalgia_Landscape.jpg\" -Directory \"C:ProgramDataWallpaper\" (Windows 10 as System)\r\n    \r\n    WARNING: Restarting Explorer.exe is required for wallpaper change to take effect!\r\n    URL Given, Downloading the file...\r\n    Download Attempt 1\r\n\r\n    Registry::HKEY_USERSS-1-5-21-3600085911-33463358-3311494591-1103Control PanelDesktopWallpaper changed from C:ProgramDataWallpaperwallpaper-686581913.jpg to C:ProgramDataWallpaperwallpaper-1935193304.jpg\r\n    Registry::HKEY_USERSS-1-5-21-3600085911-33463358-3311494591-1103Control PanelDesktopWallpaperStyle changed from 10 to 10\r\n    Registry::HKEY_USERSS-1-5-21-3600085911-33463358-3311494591-1103Control PanelDesktopTileWallpaper changed from 0 to 0\r\n    WARNING: Replacing the wallpaper transcoded file is required for wallpaper change to take immediate effect.\r\n\r\n    Registry::HKEY_USERSS-1-5-21-3870645062-3653562310-3850680542-1002Control PanelDesktopWallpaper changed from C:ProgramDataWallpaperwallpaper-686581913.jpg to C:ProgramDataWallpaperwallpaper-1935193304.jpg\r\n    Registry::HKEY_USERSS-1-5-21-3870645062-3653562310-3850680542-1002Control PanelDesktopWallpaperStyle changed from 10 to 10\r\n    Registry::HKEY_USERSS-1-5-21-3870645062-3653562310-3850680542-1002Control PanelDesktopTileWallpaper changed from 0 to 0\r\n    WARNING: Replacing the wallpaper transcoded file is required for wallpaper change to take immediate effect.\r\n\r\n    Registry::HKEY_USERSS-1-5-21-3870645062-3653562310-3850680542-1003Control PanelDesktopWallpaper changed from C:ProgramDataWallpaperwallpaper-686581913.jpg to C:ProgramDataWallpaperwallpaper-1935193304.jpg\r\n    Registry::HKEY_USERSS-1-5-21-3870645062-3653562310-3850680542-1003Control PanelDesktopWallpaperStyle changed from 10 to 10\r\n    Registry::HKEY_USERSS-1-5-21-3870645062-3653562310-3850680542-1003Control PanelDesktopTileWallpaper changed from 0 to 0\r\n    WARNING: Replacing the wallpaper transcoded file is required for wallpaper change to take immediate effect.\r\n\r\n    Registry::HKEY_USERSS-1-5-21-3870645062-3653562310-3850680542-1004Control PanelDesktopWallpaper changed from C:ProgramDataWallpaperwallpaper-686581913.jpg to C:ProgramDataWallpaperwallpaper-1935193304.jpg\r\n    Registry::HKEY_USERSS-1-5-21-3870645062-3653562310-3850680542-1004Control PanelDesktopWallpaperStyle changed from 10 to 10\r\n    Registry::HKEY_USERSS-1-5-21-3870645062-3653562310-3850680542-1004Control PanelDesktopTileWallpaper changed from 0 to 0\r\n    WARNING: Replacing the wallpaper transcoded file is required for wallpaper change to take immediate effect.\r\n\r\nPARAMETER: -WallpaperStyle \"Fill\"\r\n    This will set the wallpaper style to the appropriate option. Valid Options: \"Fill\", \"Fit\", \"Stretch\", \"Tile\", \"Center\", \"Span\"\r\n\r\nPARAMETER: -ReplaceTranscodedWallpaperFile\r\n    This will replace the file %APPDATA%MicrosoftWindowsThemesTranscodedWallpaper. This file is generated whenever the wallpaper is changed and is required for the wallpaper change to take immediate effect.\r\n\r\nPARAMETER: -RestartExplorer\r\n    This will restart explorer.exe. This is required for the wallpaper change to take immediate effect.\r\n\r\n.OUTPUTS\r\n    None\r\n.NOTES\r\n    Minimum Supported OS: Windows 7+, Server 2008+\r\n    Release Notes: Initial Release\r\nBy using this script, you indicate your acceptance of the following legal terms as well as our Terms of Use at https:\/\/www.ninjaone.com\/terms-of-use.\r\n    Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms. \r\n    Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party. \r\n    Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library or website belonging to or under the control of any other software provider. \r\n    Warranty Disclaimer: The script is provided \u201cas is\u201d and \u201cas available\u201d, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations. \r\n    Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks. \r\n    Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script. \r\n    EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).\r\n#&gt;\r\n\r\n[CmdletBinding()]\r\nparam (\r\n    [Parameter()]\r\n    [String]$Url,\r\n    [Parameter()]\r\n    [String]$Directory,\r\n    [Parameter()]\r\n    [String]$WallpaperStyle = \"Fill\",\r\n    [Parameter()]\r\n    [Switch]$ReplaceTranscodedWallpaperFile = [System.Convert]::ToBoolean($env:replaceTranscodedWallpaperFile),\r\n    [Parameter()]\r\n    [Switch]$RestartExplorer = [System.Convert]::ToBoolean($env:restartExplorer)\r\n)\r\n\r\nbegin {\r\n\r\n    # Set Dynamic Script Variables (if used)\r\n    if ($env:localWallpaperFile -and $env:localWallpaperFile -notlike \"null\") { $ExistingImage = $env:localWallpaperFile }\r\n    if ($env:directoryToStoreWallpaperIn -and $env:directoryToStoreWallpaperIn -notlike \"null\") { $Directory = $env:directoryToStoreWallpaperIn }\r\n    if ($env:linkToWallpaperFile -and $env:linkToWallpaperFile -notlike \"null\") { $Url = $env:linkToWallpaperFile }\r\n    if ($env:wallpaperDisplayMode -and $env:wallpaperDisplayMode -notlike \"null\") { $WallpaperStyle = $env:wallpaperDisplayMode }\r\n\r\n    # Validate that we received a correct value for the wallpaper style\r\n    $AllowedFit = \"Fill\", \"Fit\", \"Stretch\", \"Tile\", \"Center\", \"Span\"\r\n    if ($AllowedFit -notcontains $WallpaperStyle) {\r\n        Write-Error \"[Error] Invalid Wallpaper Display Mode selected. Please use one of the following options. Fill, Fit, Stretch, Tile, Center or Span.\"\r\n        exit 1\r\n    }\r\n\r\n    # If the local file we were told to use doesn't exist we should ignore it.\r\n    if ($ExistingImage -and -not (Test-Path $ExistingImage -ErrorAction SilentlyContinue)) {\r\n        Write-Warning \"Existing wallpaper does not exist. Ignoring...\"\r\n        $ExistingImage = $Null\r\n    }\r\n\r\n    # If we weren't given a link or a local file to use we should error out.\r\n    if (-not ($Url) -and -not ($ExistingImage)) {\r\n        Write-Error \"No image given!\"\r\n        Exit 1\r\n    }\r\n\r\n    # If we don't have a place to store the file and it doesn't already exist we should error out.\r\n    if (-not ($Directory) -and -not ($ExistingImage)) {\r\n        Write-Error \"You must specify a location to store the wallpaper.\"\r\n        Exit 1\r\n    }\r\n\r\n    # Create the directory if it does not exist.\r\n    if ($Directory -and -not (Test-Path -Path $Directory -ErrorAction SilentlyContinue)) {\r\n        try {\r\n            New-Item -Path $Directory -ItemType Directory -ErrorAction Stop | Out-Null\r\n        }\r\n        catch {\r\n            Write-Error \"Failed to create directory!\"\r\n            Exit 1\r\n        }\r\n    }\r\n\r\n    # Warn the end-user that the wallpaper change will not take immediate effect.\r\n    if (-not ($RestartExplorer)) {\r\n        Write-Warning \"Restarting Explorer.exe is required for wallpaper change to take effect!\"\r\n    }\r\n\r\n    # Handy download function.\r\n    function Invoke-Download {\r\n        param(\r\n            [Parameter()]\r\n            [String]$URL,\r\n            [Parameter()]\r\n            [String]$BaseName,\r\n            [Parameter()]\r\n            [Switch]$SkipSleep\r\n        )\r\n        Write-Host \"URL Given, Downloading the file...\"\r\n\r\n        $SupportedTLSversions = [enum]::GetValues('Net.SecurityProtocolType')\r\n        if ( ($SupportedTLSversions -contains 'Tls13') -and ($SupportedTLSversions -contains 'Tls12') ) {\r\n            [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol::Tls13 -bor [System.Net.SecurityProtocolType]::Tls12\r\n        }\r\n        elseif ( $SupportedTLSversions -contains 'Tls12' ) {\r\n            [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12\r\n        }\r\n        else {\r\n            # Not everything requires TLS 1.2, but we'll try anyways.\r\n            Write-Warning \"TLS 1.2 and or TLS 1.3 isn't supported on this system. This download may fail!\"\r\n            if ($PSVersionTable.PSVersion.Major -lt 3) {\r\n                Write-Warning \"PowerShell 2 \/ .NET 2.0 doesn't support TLS 1.2.\"\r\n            }\r\n        }\r\n\r\n        $i = 1\r\n        While ($i -lt 4) {\r\n            if (-not ($SkipSleep)) {\r\n                $SleepTime = Get-Random -Minimum 3 -Maximum 30\r\n                Start-Sleep -Seconds $SleepTime\r\n            }\r\n\r\n            Write-Host \"Download Attempt $i\"\r\n\r\n            try {\r\n                $WebClient = New-Object System.Net.WebClient\r\n                $Response = $WebClient.OpenRead($Url)\r\n                $MimeType = $WebClient.ResponseHeaders[\"Content-Type\"]\r\n                $DesiredExtension = switch -regex ($MimeType) {\r\n                    \"image\/jpeg|image\/jpg\" { \"jpg\" }\r\n                    \"image\/png\" { \"png\" }\r\n                    \"image\/gif\" { \"gif\" }\r\n                    \"image\/bmp|image\/x-windows-bmp|image\/x-bmp\" { \"bmp\" }\r\n                    default { \r\n                        Write-Error \"The URL you provided does not provide a supported image type. Image Types Supported: jpg, jpeg, bmp, png and gif. Image Type detected: $MimeType\"\r\n                        Exit 1 \r\n                    }\r\n                }\r\n                $Path = \"$BaseName.$DesiredExtension\"\r\n                $WebClient.DownloadFile($URL, $Path)\r\n                $File = Test-Path -Path $Path -ErrorAction SilentlyContinue\r\n                $Response.Close()\r\n            }\r\n            catch {\r\n                if ($Response) { $Response.Close() }\r\n                Write-Warning \"An error has occured while downloading!\"\r\n                Write-Warning $_.Exception.Message\r\n            }\r\n\r\n            if ($File) {\r\n                $i = 4\r\n            }\r\n            else {\r\n                $i++\r\n            }\r\n        }\r\n\r\n        if (-not (Test-Path $Path)) {\r\n            Write-Error \"Failed to download file!\"\r\n            Exit 1\r\n        }\r\n\r\n        $Path\r\n    }\r\n\r\n    # Get a list of all the user profiles for when the script is ran as System.\r\n    function Get-UserHives {\r\n        param (\r\n            [Parameter()]\r\n            [ValidateSet('AzureAD', 'DomainAndLocal', 'All')]\r\n            [String]$Type = \"All\",\r\n            [Parameter()]\r\n            [String[]]$ExcludedUsers,\r\n            [Parameter()]\r\n            [switch]$IncludeDefault\r\n        )\r\n    \r\n        # User account SID's follow a particular patter depending on if they're Azure AD or a Domain account or a local \"workgroup\" account.\r\n        $Patterns = switch ($Type) {\r\n            \"AzureAD\" { \"S-1-12-1-(d+-?){4}$\" }\r\n            \"DomainAndLocal\" { \"S-1-5-21-(d+-?){4}$\" }\r\n            \"All\" { \"S-1-12-1-(d+-?){4}$\" ; \"S-1-5-21-(d+-?){4}$\" } \r\n        }\r\n    \r\n        # We'll need the NTuser.dat file to load each users registry hive. So we grab it if their account sid matches the above pattern. \r\n        $UserProfiles = Foreach ($Pattern in $Patterns) { \r\n            Get-ItemProperty \"HKLM:SOFTWAREMicrosoftWindows NTCurrentVersionProfileList*\" |\r\n                Where-Object { $_.PSChildName -match $Pattern } | \r\n                Select-Object @{Name = \"SID\"; Expression = { $_.PSChildName } },\r\n                @{Name = \"UserName\"; Expression = { \"$($_.ProfileImagePath | Split-Path -Leaf)\" } }, \r\n                @{Name = \"UserHive\"; Expression = { \"$($_.ProfileImagePath)NTuser.dat\" } }, \r\n                @{Name = \"Path\"; Expression = { $_.ProfileImagePath } }\r\n        }\r\n    \r\n        # There are some situations where grabbing the .Default user's info is needed.\r\n        switch ($IncludeDefault) {\r\n            $True {\r\n                $DefaultProfile = \"\" | Select-Object UserName, SID, UserHive, Path\r\n                $DefaultProfile.UserName = \"Default\"\r\n                $DefaultProfile.SID = \"DefaultProfile\"\r\n                $DefaultProfile.Userhive = \"$env:SystemDriveUsersDefaultNTUSER.DAT\"\r\n                $DefaultProfile.Path = \"C:UsersDefault\"\r\n    \r\n                $DefaultProfile | Where-Object { $ExcludedUsers -notcontains $_.UserName }\r\n            }\r\n        }\r\n    \r\n        $UserProfiles | Where-Object { $ExcludedUsers -notcontains $_.UserName }\r\n    }\r\n\r\n    # This makes setting registry keys A LOT easier.\r\n    function Set-HKProperty {\r\n        param (\r\n            $Path,\r\n            $Name,\r\n            $Value,\r\n            [ValidateSet('DWord', 'QWord', 'String', 'ExpandedString', 'Binary', 'MultiString', 'Unknown')]\r\n            $PropertyType = 'DWord'\r\n        )\r\n        if (-not $(Test-Path -Path $Path)) {\r\n            # Check if path does not exist and create the path\r\n            New-Item -Path $Path -Force | Out-Null\r\n        }\r\n        if ((Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue)) {\r\n            # Update property and print out what it was changed from and changed to\r\n            $CurrentValue = (Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue).$Name\r\n            try {\r\n                Set-ItemProperty -Path $Path -Name $Name -Value $Value -Force -Confirm:$false -ErrorAction Stop | Out-Null\r\n            }\r\n            catch {\r\n                Write-Error \"[Error] Unable to Set registry key for $Name please see below error!\"\r\n                Write-Error $_\r\n                exit 1\r\n            }\r\n            Write-Host \"$Path$Name changed from $CurrentValue to $($(Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue).$Name)\"\r\n        }\r\n        else {\r\n            # Create property with value\r\n            try {\r\n                New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType $PropertyType -Force -Confirm:$false -ErrorAction Stop | Out-Null\r\n            }\r\n            catch {\r\n                Write-Error \"[Error] Unable to Set registry key for $Name please see below error!\"\r\n                Write-Error $_\r\n                exit 1\r\n            }\r\n            Write-Host \"Set $Path$Name to $($(Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue).$Name)\"\r\n        }\r\n    }\r\n\r\n    # This function was made just so I didn't have to make two versions of what's essentially the same code.\r\n    function Set-WallpaperKeys {\r\n        param(\r\n            $BasePath,\r\n            $WallpaperStyle,\r\n            $ImagePath\r\n        )\r\n\r\n        $RegKey = \"$BasePathControl PanelDesktop\"\r\n        $Style = switch ($WallpaperStyle) {\r\n            \"Fill\" { 10 }\r\n            \"Fit\" { 6 }\r\n            \"Stretch\" { 2 }\r\n            \"Tile\" { 0 }\r\n            \"Center\" { 0 }\r\n            \"Span\" { 22 }\r\n        }\r\n\r\n        Set-HKProperty -Path $RegKey -Name \"Wallpaper\" -Value $ImagePath -PropertyType \"String\"\r\n        Set-HKProperty -Path $RegKey -Name \"WallpaperStyle\" -Value $Style -PropertyType \"String\"\r\n        if ($WallpaperStyle -eq \"Tile\") {\r\n            Set-HKProperty -Path $RegKey -Name \"TileWallpaper\" -Value 1 -PropertyType \"String\"\r\n        }\r\n        else {\r\n            Set-HKProperty -Path $RegKey -Name \"TileWallpaper\" -Value 0 -PropertyType \"String\"\r\n        }\r\n    }\r\n\r\n    # This will overwrite the %APPDATA%MicrosoftWindowsThemesTranscodedWallpaper file.\r\n    function Reset-TranscodedWallpaper {\r\n        param(\r\n            $Username,\r\n            $BasePath\r\n        )\r\n\r\n        Write-Host \"Replacing transcoded wallpaper file for $Username.\"\r\n\r\n        if (-not (Test-Path \"$BasePathMicrosoftWindowsThemesTranscodedWallpaper\" -ErrorAction SilentlyContinue)) {\r\n            Write-Host \"Transcoded Wallpaper File does not exist. Creating it...\"\r\n            New-Item -ItemType \"file\" -Path \"$BasePathMicrosoftWindowsThemes\" -Name \"TranscodedWallpaper\" | Out-Null\r\n            # After creating a blank one windows will automatically overwrite it with what's used by the current wallpaper. We'll need to sleep to overwrite it.\r\n            Start-Sleep -Seconds 7\r\n        }\r\n\r\n        # If there's more than one file or the file for some reason still does not exist then something fishy is going on.\r\n        $TranscodedWallpaper = Get-ChildItem \"$BasePathMicrosoftWindowsThemes\" | Where-Object { $_.Name -eq \"TranscodedWallpaper\" }\r\n        if (($TranscodedWallpaper | Measure-Object).Count -gt 1) {\r\n            Write-Warning -Message \"There is more than 1 Transcoded wallpaper file user $Username may have to Log out and Log back in again to complete the wallpaper update.\"\r\n        }\r\n        elseif (($TranscodedWallpaper | Measure-Object).Count -lt 1) {\r\n            Write-Warning -Message \"Transcoded wallpaper file does not exist. User $Username may have to Log out and Log back in again to complete the wallpaper update.\"\r\n        }\r\n        else {\r\n            try {\r\n                if (Test-Path $TranscodedWallpaper.FullName -ErrorAction SilentlyContinue) { Get-Item $TranscodedWallpaper.FullName | Remove-Item -Force }\r\n                Copy-Item -Path $ExistingImage -Destination $TranscodedWallpaper.FullName -Force -ErrorAction Stop\r\n            }\r\n            catch {\r\n                Write-Warning -Message \"Failed to update Transcoded wallpaper file. User $Username may have to Log out and Log back in again to complete the wallpaper update.\"\r\n            }\r\n        } \r\n    }\r\n\r\n    # This just restarts explorer.exe\r\n    function Reset-Explorer {\r\n        Write-Host \"Restarting Explorer.exe\"\r\n        Get-Process explorer | Stop-Process -Force\r\n        Start-Process explorer.exe\r\n    }\r\n\r\n    function Test-IsSystem {\r\n        $id = [System.Security.Principal.WindowsIdentity]::GetCurrent()\r\n        return $id.Name -like \"NT AUTHORITY*\" -or $id.IsSystem\r\n    }\r\n}\r\nprocess {\r\n\r\n    # If we were given a local file and a link use the local file.\r\n    if ($Url -and -not ($ExistingImage)) {\r\n        \r\n        $ExistingImage = Invoke-Download -Url $Url -BaseName \"$Directorywallpaper-$(Get-Random)\"\r\n    }\r\n    \r\n    # Warn that older OS's don't always show the change immediately.\r\n    if ([System.Environment]::OSVersion.Version.Major -lt 10) {\r\n        Write-Warning \"On older Operating Systems wallpaper changes may require the user to log out and log back in to take effect.\"\r\n    }\r\n\r\n    if (-not (Test-IsSystem)) {\r\n\r\n        # Set's the wallpaper registry keys.\r\n        Set-WallpaperKeys -BasePath \"Registry::HKEY_CURRENT_USER\" -ImagePath $ExistingImage -WallpaperStyle $WallpaperStyle\r\n\r\n        if (-not ($ReplaceTranscodedWallpaperFile)) {\r\n            Write-Warning \"Replacing the wallpaper transcoded file is required for wallpaper change to take immediate effect.\"\r\n            Write-Host \"\"\r\n            continue\r\n        }\r\n\r\n        # Replaces the transcoded wallpaper file.\r\n        Reset-TranscodedWallpaper -Username $env:USERNAME -BasePath $env:APPDATA\r\n        \r\n        if ($RestartExplorer) {\r\n            Reset-Explorer\r\n        }\r\n\r\n        exit 0\r\n    }\r\n\r\n    Write-Host \"\"\r\n\r\n    $UserProfiles = Get-UserHives -Type \"All\"\r\n    # Loop through each profile on the machine\r\n    Foreach ($UserProfile in $UserProfiles) {\r\n        # Load User ntuser.dat if it's not already loaded\r\n        If (($ProfileWasLoaded = Test-Path Registry::HKEY_USERS$($UserProfile.SID)) -eq $false) {\r\n            Start-Process -FilePath \"cmd.exe\" -ArgumentList \"\/C reg.exe LOAD HKU$($UserProfile.SID) `\"$($UserProfile.UserHive)`\"\" -Wait -WindowStyle Hidden\r\n        }\r\n\r\n        # Sets the wallpaper registry keys.\r\n        Set-WallpaperKeys -BasePath \"Registry::HKEY_USERS$($UserProfile.SID)\" -ImagePath $ExistingImage -WallpaperStyle $WallpaperStyle\r\n\r\n        if (-not ($ReplaceTranscodedWallpaperFile)) {\r\n            Write-Warning \"Replacing the wallpaper transcoded file is required for wallpaper change to take immediate effect.\"\r\n            Write-Host \"\"\r\n            continue\r\n        }\r\n\r\n        # Replace the transcoded wallpaper\r\n        Reset-TranscodedWallpaper -Username $UserProfile.UserName -BasePath \"$($UserProfile.Path)AppDataRoaming\"\r\n        \r\n        Write-Host \"\"\r\n\r\n        # Unload NTuser.dat\r\n        If ($ProfileWasLoaded -eq $false) {\r\n            [gc]::Collect()\r\n            Start-Sleep 1\r\n            Start-Process -FilePath \"cmd.exe\" -ArgumentList \"\/C reg.exe UNLOAD HKU$($UserProfile.SID)\" -Wait -WindowStyle Hidden | Out-Null\r\n        }\r\n    }\r\n\r\n    if ($RestartExplorer) {\r\n        Reset-Explorer\r\n    }\r\n\r\n    exit 0\r\n}\r\nend {\r\n    \r\n    \r\n    \r\n}<\/pre>\n<p>&nbsp;<\/p>\n\n<div class=\"in-context-cta\"><p>Acc\u00e9dez \u00e0 plus de 700\u00a0scripts dans le Dojo NinjaOne<\/p>\n<p><a href=\"https:\/\/www.ninjaone.com\/fr\/phase-de-test-gratuit\/\">Obtenir l&rsquo;acc\u00e8s<\/a><\/p>\n<\/div>\n<h2>Description d\u00e9taill\u00e9e<\/h2>\n<p>Le script op\u00e8re en plusieurs \u00e9tapes\u00a0:<\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><strong>Initialisation des param\u00e8tres<\/strong> : il commence par d\u00e9finir des param\u00e8tres tels que l&rsquo;URL du fond d&rsquo;\u00e9cran, le r\u00e9pertoire de stockage et le style (par exemple, remplir, ajuster, \u00e9tirer).<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><strong>V\u00e9rifications avant ex\u00e9cution<\/strong> : il valide le style de fond d\u2019\u00e9cran et v\u00e9rifie l&rsquo;existence de l&rsquo;image et du r\u00e9pertoire sp\u00e9cifi\u00e9s.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><strong>T\u00e9l\u00e9chargement du fond d&rsquo;\u00e9cran<\/strong> : si une URL est fournie, le script t\u00e9l\u00e9charge l&rsquo;image dans le r\u00e9pertoire sp\u00e9cifi\u00e9.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"4\" data-aria-level=\"1\"><strong>R\u00e9glage du fond d\u2019\u00e9cran pour chaque utilisateur<\/strong> : le script modifie les param\u00e8tres du registre pour chaque profil d&rsquo;utilisateur afin de changer le fond d&rsquo;\u00e9cran. Il traite \u00e9galement des cas particuliers tels que les comptes syst\u00e8me.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"5\" data-aria-level=\"1\"><strong>Options \u00e0 effet imm\u00e9diat<\/strong> : les options de remplacement du fichier de fond d&rsquo;\u00e9cran transcod\u00e9 et de red\u00e9marrage du processus Explorer garantissent que les modifications prennent effet imm\u00e9diatement.<\/li>\n<\/ul>\n<h2>Cas d&rsquo;utilisation potentiels<\/h2>\n<p>Imaginez qu&rsquo;un administrateur informatique d&rsquo;une grande entreprise doive mettre \u00e0 jour les fonds d&rsquo;\u00e9cran de tous les ordinateurs de ses employ\u00e9s pour qu&rsquo;ils arborent le nouveau logo de l&rsquo;entreprise. \u00c0 l&rsquo;aide de ce script, il peut d\u00e9ployer le nouveau fond d\u2019\u00e9cran sur l&rsquo;ensemble du r\u00e9seau, en veillant \u00e0 ce que chaque utilisateur, quels que soient ses param\u00e8tres individuels, voie la nouvelle image de marque.<\/p>\n<h2>Comparaisons<\/h2>\n<p>La modification des fonds d&rsquo;\u00e9cran sur plusieurs profils n\u00e9cessite en g\u00e9n\u00e9ral des ajustements manuels ou des strat\u00e9gies de groupe. Ce script offre une approche plus directe et plus souple, particuli\u00e8rement utile dans les environnements o\u00f9 les strat\u00e9gies de groupe ne sont pas r\u00e9alisables ou trop lourdes \u00e0 mettre en place.<\/p>\n<h2>FAQ<\/h2>\n<p><strong>Q\u00a0: Ce script fonctionnera-t-il sur toutes les versions de Windows\u00a0?<\/strong><br \/>\nR\u00a0: Le script est con\u00e7u pour Windows\u00a07 et les versions plus r\u00e9centes, mais certaines fonctionnalit\u00e9s peuvent ne pas fonctionner sur des versions ant\u00e9rieures, comme Server\u00a02008 par exemple.<\/p>\n<p><strong>Q\u00a0: Puis-je utiliser n&rsquo;importe quel format d&rsquo;image comme fond d&rsquo;\u00e9cran\u00a0?<\/strong><br \/>\nR\u00a0: Le script prend en charge les formats courants tels que JPG, PNG, BMP et GIF.<\/p>\n<h2>Implications<\/h2>\n<p>Bien que ce script soit pratique, il souligne \u00e9galement la n\u00e9cessit\u00e9 de g\u00e9rer soigneusement les autorisations de script et les politiques d&rsquo;ex\u00e9cution, car il implique la modification des param\u00e8tres du registre et des fichiers syst\u00e8me, ce qui pourrait pr\u00e9senter des risques pour la s\u00e9curit\u00e9 en cas d&rsquo;utilisation abusive.<\/p>\n<h2>Recommandations<\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"6\" data-aria-level=\"1\"><strong>Effectuez des tests approfondis<\/strong> : testez toujours les scripts dans un environnement contr\u00f4l\u00e9 avant de les d\u00e9ployer sur l&rsquo;ensemble du r\u00e9seau.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"7\" data-aria-level=\"1\"><strong>G\u00e9rez les autorisations<\/strong> : restreignez l&rsquo;ex\u00e9cution des scripts au personnel autoris\u00e9 afin d&rsquo;\u00e9viter toute utilisation abusive.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559684&quot;:-2,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" data-aria-posinset=\"8\" data-aria-level=\"1\"><strong>Modifications du document<\/strong> : conservez un journal indiquant quand et comment le script est utilis\u00e9 \u00e0 des fins d&rsquo;audit et de d\u00e9pannage.<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>Dans un environnement informatique dynamique, des outils tels que <a href=\"https:\/\/www.ninjaone.com\/fr\/efficacite\/\">NinjaOne peuvent consid\u00e9rablement am\u00e9liorer l&rsquo;efficacit\u00e9 de t\u00e2ches<\/a> telles que le d\u00e9ploiement de ce script PowerShell. Gr\u00e2ce \u00e0 ses <a href=\"https:\/\/www.ninjaone.com\/fr\/rmm\/automatisation-informatique\/\">capacit\u00e9s de gestion et d&rsquo;automatisation<\/a> performantes, NinjaOne permet de rationaliser le processus de d\u00e9ploiement, et les professionnels de l\u2019informatique peuvent maintenir plus facilement et en toute confiance des environnements de bureau coh\u00e9rents pour de multiples profils d&rsquo;utilisateurs. Cet alignement de l&rsquo;automatisation et de la gestion renforce l&rsquo;importance de l&rsquo;int\u00e9gration d&rsquo;outils puissants tels que les <a href=\"https:\/\/www.ninjaone.com\/fr\/script-hub\/\">scripts PowerShell<\/a> dans des strat\u00e9gies de gestion informatique plus larges.<\/p>\n","protected":false},"author":35,"featured_media":194539,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","_lmt_disableupdate":"no","_lmt_disable":""},"operating_system":[4212],"use_cases":[4287],"class_list":["post-213440","script_hub","type-script_hub","status-publish","has-post-thumbnail","hentry","script_hub_category-windows","use_cases-configuration-de-systeme"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/script_hub\/213440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/script_hub"}],"about":[{"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/types\/script_hub"}],"author":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/comments?post=213440"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/media\/194539"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/media?parent=213440"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/operating_system?post=213440"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/fr\/wp-json\/wp\/v2\/use_cases?post=213440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}