Windows 10/Deployment Batch

From Wiki
< Windows 10
Revision as of 22:35, 16 November 2018 by Marcluer (talk | contribs)
  • disable/enable powershell restrictions
set-executionpolicy unrestricted
set-executionpolicy restricted


  • Disable Cortana
$path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"     
IF(!(Test-Path -Path $path)) {  
    New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows" -Name "Windows Search" 
}  
Set-ItemProperty -Path $path -Name "AllowCortana" -Value 0  
#Restart Explorer to change it immediately     
Stop-Process -name explorer


  • Uninstall OneDrive
taskkill /f /im OneDrive.exe
%SystemRoot%\System32\OneDriveSetup.exe /uninstall
%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall


  • Show all tray icons
$path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer"     
Set-ItemProperty -Path $path -Name "EnableAutoTray" -Value 0  
  • Disable Intel HD Graphics tray icon + shortcuts
$path = "HKCU:\Intel\Display\igfxcui\igfxtray\TrayIcon"
Set-ItemProperty -Path $path -Name "ShowTracyIcon" -Value 0  

$path = "HKCU:\Intel\Display\igfxcui\HotKeys"
Set-ItemProperty -Path $path -Name "Enable" -Value 0  


$path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
Remove-ItemProperty -Path $path -Name "IgfxTray"
Remove-ItemProperty -Path $path -Name "HotKeysCmds"
Remove-ItemProperty -Path $path -Name "Persistence"