禁止Win11自动升级的PowerShell脚本

脚本来源:Microsoft Azure 虚拟机管理
DisableWindowsUpdate
Details:Disable Automatic Updates through Windows Update.

脚本内容:

$reg_path = "HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
if (-Not (Test-Path $reg_path)) {
    
     New-Item $reg_path -Force }
Set-ItemProperty $reg_path -Name NoAutoUpdate -Value 1
Set-ItemProperty $reg_path -Name AUOptions -Value 3

注意:使用管理员权限运行

猜你喜欢

转载自blog.csdn.net/u013667796/article/details/130453664