Added HKLM and HKCU
This commit is contained in:
@@ -5,10 +5,14 @@ If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
|
||||
|
||||
#disable ai registry keys
|
||||
Write-Host 'Applying Registry Keys...'
|
||||
#set for local machine and current user to be sure
|
||||
$hives = @('HKLM', 'HKCU')
|
||||
foreach ($hive in $hives) {
|
||||
Reg.exe add "$hive\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot" /v 'TurnOffWindowsCopilot' /t REG_DWORD /d '1' /f *>$null
|
||||
Reg.exe add "$hive\SOFTWARE\Policies\Microsoft\Windows\WindowsAI" /v 'DisableAIDataAnalysis' /t REG_DWORD /d '1' /f *>$null
|
||||
}
|
||||
Reg.exe add 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' /v 'ShowCopilotButton' /t REG_DWORD /d '0' /f *>$null
|
||||
Reg.exe add 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot' /v 'TurnOffWindowsCopilot' /t REG_DWORD /d '1' /f *>$null
|
||||
Reg.exe add 'HKCU\Software\Microsoft\input\Settings' /v 'InsightsEnabled' /t REG_DWORD /d '0' /f *>$null
|
||||
Reg.exe add 'HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsAI' /v 'DisableAIDataAnalysis' /t REG_DWORD /d '1' /f *>$null
|
||||
#force policy changes
|
||||
gpupdate /force >$null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user