{"id":241780,"date":"2024-04-24T15:13:15","date_gmt":"2024-04-24T15:13:15","guid":{"rendered":"https:\/\/www.ninjaone.com\/?post_type=script_hub&#038;p=241780"},"modified":"2024-04-24T15:13:15","modified_gmt":"2024-04-24T15:13:15","slug":"configurare-windows-spotlight","status":"publish","type":"script_hub","link":"https:\/\/www.ninjaone.com\/it\/script-hub\/configurare-windows-spotlight\/","title":{"rendered":"Gestire in modo efficiente i suggerimenti di Windows Spotlight e del menu Start con PowerShell"},"content":{"rendered":"<h2>Punti chiave<\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Semplifica la personalizzazione<\/strong>: Lo script gestisce in modo efficiente i suggerimenti di Windows Spotlight e del menu Start su pi\u00f9 profili utente.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Sono richiesti privilegi amministrativi<\/strong>: L&#8217;esecuzione di questo script richiede diritti amministrativi a causa delle modifiche apportate al registro di sistema.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Comprende vari profili di utenti<\/strong>: Si occupa di Azure AD, domini e account utente locali, garantendo un&#8217;applicazione completa.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Caratteristiche specifiche del sistema operativo<\/strong>: Adeguato alle differenze tra Windows 10 e Windows 11, soprattutto nelle edizioni aziendali.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Automatizza le attivit\u00e0 pi\u00f9 noiose<\/strong>: Sostituisce la necessit\u00e0 di modificare manualmente il registro di sistema o di configurare i criteri di gruppo.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Equilibrio tra privacy ed esperienza utente<\/strong>: Offre il controllo su contenuti e suggerimenti personalizzati, in linea con gli standard di privacy e le preferenze degli utenti.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Essenziale per gli MSP e i professionisti IT<\/strong>: Uno strumento prezioso per i provider di servizi gestiti e i professionisti IT nella gestione degli ambienti di rete.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Si consiglia di eseguire test e backup<\/strong>: Consiglia di testare lo script in un ambiente controllato e di eseguire il backup delle impostazioni del registro prima dell&#8217;implementazione.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Rafforzato con NinjaOne<\/strong>: Le capacit\u00e0 dello script per configurare Windows Spotlight possono essere aumentate se utilizzate insieme alla piattaforma di gestione IT di NinjaOne.<\/li>\n<\/ul>\n<p>Il sistema operativo Windows offre una serie di funzioni personalizzabili per migliorare l&#8217;esperienza dell&#8217;utente, tra cui i suggerimenti di Windows Spotlight e del menu Start. Questo blog approfondisce uno script PowerShell progettato per la configurazione di queste funzionalit\u00e0, evidenziandone l&#8217;importanza per i professionisti IT e i <a href=\"https:\/\/www.ninjaone.com\/it\/cos-e-un-msp\/\" target=\"_blank\" rel=\"noopener\">fornitori di servizi gestiti (MSP)<\/a>.<\/p>\n<h2>Background<\/h2>\n<p>In seguito all&#8217;evoluzione dell&#8217;interfaccia di Windows, la gestione e la personalizzazione dell&#8217;esperienza utente sono diventate sempre pi\u00f9 importanti. I suggerimenti di Spotlight e del menu Start sono caratteristiche fondamentali in Windows 10 e 11, in quanto forniscono contenuti personalizzati e consigli sulle app. Tuttavia, per vari motivi, tra cui la privacy e le preferenze degli utenti, i professionisti IT e gli MSP spesso cercano di controllare queste funzionalit\u00e0 su pi\u00f9 profili utente. Questo script PowerShell offre una soluzione, abilitando o disabilitando queste funzioni in modo sistematico.<\/p>\n<h2>Lo script per configurare Windows Spotlight:<\/h2>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">#Requires -Version 5.1\r\n\r\n&lt;#\r\n.SYNOPSIS\r\n    Enable or Disable Spotlight and Suggestions in the Start Menu.\r\n.DESCRIPTION\r\n    Enable or Disable Spotlight and Suggestions in the Start Menu.\r\n.EXAMPLE\r\n    (No Parameters)\r\n\r\n    On Windows 11, only recommendations for tips, shortcuts, and new apps are disabled\/enabled from the Start Menu.\r\n    Attempting to Disable Spotlight and Start Menu Suggestions\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\\SubscribedContent-338389Enabled changed from 0 to 0\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\\SubscribedContent-338388Enabled changed from 0 to 0\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\\SystemPaneSuggestionsEnabled changed from 0 to 0\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent\\DisableWindowsSpotlightFeatures changed from 1 to 1\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\Start_IrisRecommendations changed from 0 to 0\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\\SubscribedContent-338389Enabled changed from 0 to 0\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\\SubscribedContent-338388Enabled changed from 0 to 0\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\\SystemPaneSuggestionsEnabled changed from 0 to 0\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent\\DisableWindowsSpotlightFeatures changed from 1 to 1\r\n    Registry::HKEY_USERS\\S-1-11-1-1111111111-1111111111-1111111111-1111111111\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\Start_IrisRecommendations changed from 0 to 0\r\n\r\nPARAMETER: -Enable\r\n    Enables Spotlight and Suggestions in the Start Menu.\r\n.OUTPUTS\r\n    None\r\n.NOTES\r\n    Minimum OS Architecture Supported: Windows 10\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    [Switch]$Enable\r\n)\r\n\r\nbegin {\r\n    # Retrieve Dynamic Script Form Values\r\n    if ($env:enableOrDisable -and $env:enableOrDisable -notlike \"null\") {\r\n        if ($env:enableOrDisable -eq \"Enable\") { $Enable = $True }\r\n    }\r\n\r\n    # Local Admin Privileges are required to set other users' registry keys\r\n    function Test-IsElevated {\r\n        $id = [System.Security.Principal.WindowsIdentity]::GetCurrent()\r\n        $p = New-Object System.Security.Principal.WindowsPrincipal($id)\r\n        $p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)\r\n    }\r\n\r\n    # Get a list of all the user profiles for when the script is run 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 pattern 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 user's 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:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\*\" |\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:SystemDrive\\Users\\Default\\NTUSER.DAT\"\r\n                $DefaultProfile.Path = \"C:\\Users\\Default\"\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    # Helper function for setting registry keys\r\n    function Set-RegKey {\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 Ignore)) {\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 Ignore).$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 the error below!\"\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 Ignore).$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 the error below!\"\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 Ignore).$Name)\"\r\n        }\r\n    }\r\n\r\n    # Gets the OS Name, e.g., Windows 10 Enterprise or Windows 11 Enterprise\r\n    function Get-OSName {\r\n        systeminfo | findstr \/B \/C:\"OS Name\"\r\n    }\r\n\r\n    $OSName = Get-OSName\r\n}\r\nprocess {\r\n\r\n    # Error out if the script doesn't have local administrator privileges\r\n    if (-not (Test-IsElevated)) {\r\n        Write-Error -Message \"Access Denied. Please run with Administrator privileges.\" -Exception (New-Object -TypeName System.UnauthorizedAccessException) -Category PermissionDenied\r\n        exit 1\r\n    }\r\n\r\n    # Get the registry hive for all users\r\n    $UserProfiles = Get-UserHives -Type \"All\"\r\n\r\n    # Initialize generic list for the keys we're going to set\r\n    $Keys = New-Object System.Collections.Generic.List[Object]\r\n    $LoadedProfiles = New-Object System.Collections.Generic.List[Object]\r\n\r\n    Foreach ($UserProfile in $UserProfiles) {\r\n        # Load User ntuser.dat if it's not already loaded\r\n        if ((Test-Path \"Registry::HKEY_USERS\\$($UserProfile.SID)\" -ErrorAction Ignore) -eq $false) {\r\n            $LoadedProfiles.Add($UserProfile)\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        $Keys.Add(\r\n            [PSCustomObject]@{\r\n                Path  = \"Registry::HKEY_USERS\\$($UserProfile.SID)\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\"\r\n                Name  = \"SubscribedContent-338389Enabled\"\r\n                Value = if ($Enable) { 1 }Else { 0 }\r\n            }\r\n        )\r\n\r\n        $Keys.Add(\r\n            [PSCustomObject]@{\r\n                Path  = \"Registry::HKEY_USERS\\$($UserProfile.SID)\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\"\r\n                Name  = \"SubscribedContent-338388Enabled\"\r\n                Value = if ($Enable) { 1 }Else { 0 }\r\n            }\r\n        )\r\n\r\n        $Keys.Add(\r\n            [PSCustomObject]@{\r\n                Path  = \"Registry::HKEY_USERS\\$($UserProfile.SID)\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager\"\r\n                Name  = \"SystemPaneSuggestionsEnabled\"\r\n                Value = if ($Enable) { 1 }Else { 0 }\r\n            }\r\n        )\r\n\r\n        # This key only works on Windows 10\/11 Enterprise\r\n        if ($OSName -Like \"*Enterprise*\") {\r\n            $Keys.Add(\r\n                [PSCustomObject]@{\r\n                    Path  = \"Registry::HKEY_USERS\\$($UserProfile.SID)\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent\"\r\n                    Name  = \"DisableWindowsSpotlightFeatures\"\r\n                    Value = if ($Enable) { 0 }Else { 1 }\r\n                }\r\n            )\r\n        }\r\n        else {\r\n            Write-Warning \"Disabling Spotlight is only possible on an Enterprise edition of Windows.\" \r\n        }\r\n\r\n        # The recommended section in Windows 11 is slightly helpful; this will simply remove the ads but keep the useful frequently used section.\r\n        if ($OSName -Like \"*11*\") {\r\n            $Keys.Add(\r\n                [PSCustomObject]@{\r\n                    Path  = \"Registry::HKEY_USERS\\$($UserProfile.SID)\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\"\r\n                    Name  = \"Start_IrisRecommendations\"\r\n                    Value = if ($Enable) { 1 }Else { 0 }\r\n                }\r\n            )\r\n        }\r\n    }\r\n\r\n    if($OSName -Like \"*11*\"){\r\n        Write-Host \"On Windows 11, only recommendations for tips, shortcuts, and new apps are disabled\/enabled from the Start Menu.\"\r\n    }\r\n    \r\n    if ($Enable) {\r\n        Write-Host \"Attempting to Enable Spotlight and Start Menu Suggestions\"\r\n    }\r\n    else {\r\n        Write-Host \"Attempting to Disable Spotlight and Start Menu Suggestions\"\r\n    }\r\n\r\n    # Set all the registry keys\r\n    $Keys | ForEach-Object { Set-RegKey -Path $_.Path -Name $_.Name -Value $_.Value }\r\n\r\n    # Unload any profiles we loaded up earlier (if any)\r\n    Foreach ($LoadedProfile in $LoadedProfiles) {\r\n        [gc]::Collect()\r\n        Start-Sleep 1\r\n        Start-Process -FilePath \"cmd.exe\" -ArgumentList \"\/C reg.exe UNLOAD HKU\\$($LoadedProfile.SID)\" -Wait -WindowStyle Hidden | Out-Null\r\n    }\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 style=\"text-align: center;\">Accedi a oltre 700 script nel Dojo di NinjaOne<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.ninjaone.com\/it\/prova-gratuita\/\">Ottieni l&#8217;accesso<\/a><\/p>\n<\/div>\n<h2>Analisi dettagliata<\/h2>\n<p>Lo script inizia con una sinossi e una descrizione, indicando il suo scopo: attivare i suggerimenti di Windows Spotlight e del menu Start. Utilizza le funzionalit\u00e0 di PowerShell per modificare le impostazioni del registro di sistema per i singoli profili utente, compresi gli account Azure AD e di dominio.<\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Inizializzazione<\/strong>: Lo script inizia controllando la variabile d&#8217;ambiente <strong>$env:enableOrDisable<\/strong> per determinare se deve abilitare o disabilitare le funzioni.<\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Controllo dei diritti di amministratore<\/strong>: Include una funzione <strong>Test-IsElevated<\/strong> per verificare se lo script viene eseguito con privilegi di amministratore, essenziali per modificare le chiavi di registro.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Gestione del profilo utente<\/strong>: La funzione <strong>Get-UserHives<\/strong> viene utilizzata per recuperare i profili degli utenti. Filtra gli account Azure AD, di dominio e locali, assicurando che lo script si rivolga ai profili utente necessari.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Modifica del registro<\/strong>: Lo script costruisce un elenco di chiavi di registro da modificare. Questi tasti controllano vari aspetti dei suggerimenti di Spotlight e del menu Start. A seconda dell&#8217;interruttore <strong>$Enable<\/strong>, imposta questi tasti per abilitare o disabilitare le funzioni.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Gestione specifica del sistema operativo<\/strong>: Lo script include anche controlli per la versione del sistema operativo, tenendo conto delle specificit\u00e0 di Windows 10 e Windows 11.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Esecuzione e pulizia<\/strong>: Infine, lo script applica le modifiche a ciascun profilo utente e scarica tutti gli hive caricati, assicurando che non vi sia alcun impatto residuo sulle prestazioni del sistema.<\/li>\n<\/ul>\n<h2>Casi d&#8217;uso potenziali<\/h2>\n<p>Considera un MSP che gestisce una rete aziendale. Per motivi di privacy, \u00e8 necessario disabilitare i suggerimenti del menu Start su tutti i profili degli utenti. Utilizzando questo script, l&#8217;MSP pu\u00f2 applicare sistematicamente queste modifiche senza configurare manualmente ogni profilo, risparmiando tempo e riducendo il rischio di incongruenze.<\/p>\n<h2>Confronti<\/h2>\n<p>Solitamente tali modifiche richiedevano la modifica manuale del registro di sistema o l&#8217;adeguamento dei criteri di gruppo. Questo script semplifica il processo, fornendo un metodo pi\u00f9 efficiente e meno soggetto a errori. Inoltre, comprende i profili utente che potrebbero non essere influenzati dai criteri di gruppo, offrendo una soluzione pi\u00f9 completa.<\/p>\n<h2>Domande frequenti<\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>D:<\/strong> Questo script pu\u00f2 essere utilizzato su versioni non aziendali di Windows?\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>R:<\/strong> S\u00ec, ma alcune funzioni come la disabilitazione di Windows Spotlight sono specifiche delle edizioni Enterprise.<\/li>\n<\/ul>\n<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>D:<\/strong> I privilegi amministrativi sono obbligatori per l&#8217;esecuzione di questo script?\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>R:<\/strong> S\u00ec, la modifica delle chiavi di registro richiede diritti amministrativi.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Implicazioni<\/h2>\n<p>Se da un lato questo script offre una potente personalizzazione, dall&#8217;altro comporta implicazioni per l&#8217;esperienza dell&#8217;utente e la privacy. La disattivazione di Spotlight e dei suggerimenti pu\u00f2 avere un impatto sul modo in cui gli utenti interagiscono con il sistema operativo e trovano nuove funzioni o app. Gli amministratori IT devono valutare queste considerazioni in base alle policy organizzative e alle esigenze degli utenti.<\/p>\n<h2>Raccomandazioni<\/h2>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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>Testa accuratamente<\/strong>: Esegui lo script in un ambiente controllato prima della distribuzione.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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=\"11\" data-aria-level=\"1\"><strong>Effettua un backup dei registr<\/strong>i: Esegui sempre un backup delle impostazioni del registro prima di apportare modifiche.<\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&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=\"12\" data-aria-level=\"1\"><strong>Informa gli utenti<\/strong>: Se la distribuzione avviene in un ambiente aziendale, informa gli utenti delle modifiche per garantire la trasparenza.<\/li>\n<\/ul>\n<h2>Considerazioni finali<\/h2>\n<p>Nel contesto di questo script, NinjaOne fornisce una piattaforma in grado di semplificare ulteriormente tali attivit\u00e0 di gestione IT. La sua capacit\u00e0 di distribuire <a href=\"https:\/\/www.ninjaone.com\/it\/script-hub\/\" target=\"_blank\" rel=\"noopener\">script<\/a> in tutta la rete pu\u00f2 rendere l&#8217;implementazione di modifiche simili pi\u00f9 <a href=\"https:\/\/www.ninjaone.com\/it\/efficienza-it\/\" target=\"_blank\" rel=\"noopener\">facile da gestire ed efficiente<\/a>, rafforzando il suo valore come <a href=\"https:\/\/www.ninjaone.com\/platform\/?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=SG_PS_IT_Operations_Management&amp;utm_content=demo&amp;utm_term=it%20operations%20management&amp;utm_matchtype=p&amp;utm_device=c&amp;utm_adposition=&amp;utm_gclid=CjwKCAjwh4-wBhB3EiwAeJsppEjThDSGu8-JSMwoiy-5LfC8CRK4pO8oYCqfG2Ri-asxopsSmfp7NhoCvtQQAvD_BwE&amp;_bt=675403308386&amp;_bk=it%20operations%20management&amp;_bm=p&amp;_bn=g&amp;_bg=156867163809%E2%80%A9&amp;gad_source=1&amp;gclid=CjwKCAjwh4-wBhB3EiwAeJsppEjThDSGu8-JSMwoiy-5LfC8CRK4pO8oYCqfG2Ri-asxopsSmfp7NhoCvtQQAvD_BwE\" target=\"_blank\" rel=\"noopener\">soluzione di gestione IT completa<\/a>.<\/p>\n","protected":false},"author":35,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","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":[4269],"class_list":["post-241780","script_hub","type-script_hub","status-publish","hentry","script_hub_category-windows","use_cases-configurazione-generale"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/script_hub\/241780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/script_hub"}],"about":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/types\/script_hub"}],"author":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/comments?post=241780"}],"wp:attachment":[{"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/media?parent=241780"}],"wp:term":[{"taxonomy":"script_hub_category","embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/operating_system?post=241780"},{"taxonomy":"use_cases","embeddable":true,"href":"https:\/\/www.ninjaone.com\/it\/wp-json\/wp\/v2\/use_cases?post=241780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}