Get-Nerdio / NMM-SE

7 stars 7 forks source link

Windows 11 optimizations script #2

Open sp1nkick opened 4 months ago

sp1nkick commented 4 months ago

Tony, thank you for this script, this appears to be exactly what we are struggling with on a few deployments, users specifically on latest windows 11 enterprise pooled session host note slow speed, back button issues and search issues with the new windows 11 explorer. When I try to use your script it appears the paths are not there. Does this create them? Or should we be using this alongside some other script , or only against the gold desktop image?

When ran as a scripted action:

6aa8241d-1566-4645-86dd-99a5c827af11.zip

Should it be ran as intune/GPO policy against each user instead?

sp1nkick commented 4 months ago

I think this helps create the registry key if it doesn't exist. I will test if it makes a difference.

`# Function to set registry key value with error handling function Set-RegistryValue { param ( [string]$Path, [string]$Name, [Object]$Value, [Microsoft.Win32.RegistryValueKind]$Type ) try { if (-not (Test-Path -Path $Path)) { New-Item -Path $Path -Force | Out-Null Write-Output "Created registry path: $Path" } Set-ItemProperty -Path $Path -Name $Name -Value $Value -Type $Type -ErrorAction Stop Write-Output "Successfully set $Name to $Value in $Path" } catch { Write-Error "Failed to set $Name in $Path. Error: $_" } }

Disabling web search on the start menu makes it so much faster and effective!

Set-RegistryValue -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -Value 0 -Type DWord

Speed up File Explorer's slow folder scanning!

Set-RegistryValue -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell" -Name "FolderType" -Value "NotSpecified" -Type String `

pyasuda commented 3 months ago

Question about these and and HKCU in general: Can these settings be made on the image? Or run them at VM deployment? Thanks! I should have googled first. Looks like this is more useful with Intune than Scripted Actions. Sigh.