admin 管理员组

文章数量: 1184232

​        Windows 11 默认会自动下载安装更新,并且经常弹出更新提示。对于部分用户来说,自动更新可能会带来不便。本文介绍如何彻底关闭 Win11 自动更新,并附带恢复方法。

### 关闭步骤

1. **以管理员身份打开 PowerShell**:

 - 在电脑桌面点击键盘 `Win` 键或点击电脑任务栏下方开始按钮。

 - 搜索框输入powershell,点击以管理员身份运行。

2. **复制以下脚本粘贴到 PowerShell 执行:**

powershell命令如下:

 # 一键禁用 Windows Update 相关服务

 $services = @('wuauserv', 'bits', 'cryptsvc')

 foreach ($svc in $services) {

   try {

     Stop-Service -Name $svc -Force -ErrorAction SilentlyContinue

     Set-Service -Name $svc -StartupType Disabled

     Write-Host "$svc 已禁用" -ForegroundColor Green

   } catch {

     Write-Host "无法禁用 $svc:$($_.Exception.Message)" -ForegroundColor Yellow

   }

 }

 Write-Host "请重启电脑以确保设置生效。" -ForegroundColor Cyan

效果示意:

3. **复制以下脚本粘贴到 PowerShell 执行,以关闭 Windows 更新相关通知:** > 该脚本通过禁用 Windows Update 通知相关的计划任务,减少弹窗和提示。

powershell命令如下:

# 关闭 Windows 更新相关通知计划任务

$tasks = @(

  '\\\\Microsoft\\Windows\\UpdateOrchestrator\\Schedule Scan',

  '\\\\Microsoft\\Windows\\UpdateOrchestrator\\Schedule Scan Static Task',

  '\\\\Microsoft\\Windows\\UpdateOrchestrator\\UpdateModelTask',

  '\\\\Microsoft\\Windows\\WindowsUpdate\\Automatic App Update',

  '\\\\Microsoft\\Windows\\WindowsUpdate\\Scheduled Start',

  '\\\\Microsoft\\Windows\\WindowsUpdate\\sih',

  '\\\\Microsoft\\Windows\\WindowsUpdate\\sihboot'

)

foreach ($task in $tasks) {

  try {

    Disable-ScheduledTask -TaskPath ($task.Substring(0, $task.LastIndexOf('\\')+1)) -TaskName ($task.Substring($task.LastIndexOf('\\')+1)) -ErrorAction SilentlyContinue

    Write-Host "$task 已禁用" -ForegroundColor Green

  } catch {

    Write-Host "无法禁用 $task:$($_.Exception.Message)" -ForegroundColor Yellow

  }

}

Write-Host "部分通知可能仍由系统控制,已尽量关闭相关计划任务。" -ForegroundColor Cyan

效果示意:

4.重启电脑以确保设置生效

5.检测自动更新服务状态脚本(测试)

powershell命令如下:

 # 检测 Windows Update 相关服务状态

 $services = @('wuauserv', 'bits', 'cryptsvc')

 Get-Service -Name $services | Select-Object Name, Status, StartType | Format-Table -AutoSize

效果示意:

说明:

 - Status 为 Stopped 且 StartType 为 Disabled,说明禁用生效。

 - Status 为 Running 且 StartType 为 Automatic,说明服务已恢复。

常见问题:

- cryptsvc 重启后会变成 Running/Manual?

--------不需要担心,这属于 Windows 的正常行为。--------

        解析:cryptsvc(Cryptographic Services)不仅仅被 Windows Update 使用,还是很多系统安全、证书、加密等功能的基础服务。Windows 在启动时会根据系统需要自动调整它的启动类型和状态,即使你手动设置为 Disabled,某些系统操作或安全策略会把它恢复为 Manual 并启动。Windows 设计上会自动修复某些“关键服务”的启动类型,防止系统功能异常。cryptsvc 就属于这类服务。

        总结:只要 wuauserv(Windows Update 服务)和 bits(后台智能传输服务)保持 Disabled/Stopped,自动更新就不会工作。

### 恢复步骤

1. **以管理员身份打开 PowerShell**。

2. **复制以下脚本粘贴到 PowerShell 执行:**

powershell命令如下:

 # 一键恢复 Windows Update 相关服务

 $services = @('wuauserv', 'bits', 'cryptsvc')

 foreach ($svc in $services) {

   try {

     Set-Service -Name $svc -StartupType Automatic

     Start-Service -Name $svc

     Write-Host "$svc 已恢复为自动并启动" -ForegroundColor Green

   } catch {

     Write-Host "无法恢复 $svc:$($_.Exception.Message)" -ForegroundColor Yellow

   }

 }

 Write-Host "请重启电脑以确保设置生效。" -ForegroundColor Cyan

3. **复制以下脚本粘贴到 PowerShell 执行,以恢复 Windows 更新相关通知:** > 该脚本通过启用之前禁用的 Windows Update 通知相关计划任务,恢复弹窗和提示。

powershell命令如下:

# 恢复 Windows 更新相关通知计划任务

$tasks = @(

  '\\\\Microsoft\\Windows\\UpdateOrchestrator\\Schedule Scan',

  '\\\\Microsoft\\Windows\\UpdateOrchestrator\\Schedule Scan Static Task',

  '\\\\Microsoft\\Windows\\UpdateOrchestrator\\UpdateModelTask',

  '\\\\Microsoft\\Windows\\WindowsUpdate\\Automatic App Update',

  '\\\\Microsoft\\Windows\\WindowsUpdate\\Scheduled Start',

  '\\\\Microsoft\\Windows\\WindowsUpdate\\sih',

  '\\\\Microsoft\\Windows\\WindowsUpdate\\sihboot'

)

foreach ($task in $tasks) {

  try {

    Enable-ScheduledTask -TaskPath ($task.Substring(0, $task.LastIndexOf('\\')+1)) -TaskName ($task.Substring($task.LastIndexOf('\\')+1)) -ErrorAction SilentlyContinue

    Write-Host "$task 已恢复" -ForegroundColor Green

  } catch {

    Write-Host "无法恢复 $task:$($_.Exception.Message)" -ForegroundColor Yellow

  }

}

Write-Host "相关通知计划任务已恢复。" -ForegroundColor Cyan

4.检测自动更新服务状态脚本

powershell命令如下:

# 检测 Windows Update 相关服务状态

 $services = @('wuauserv', 'bits', 'cryptsvc')

 Get-Service -Name $services | Select-Object Name, Status, StartType | Format-Table -AutoSize

说明:

 - Status 为 Stopped 且 StartType 为 Disabled,说明禁用生效。

 - Status 为 Running 且 StartType 为 Automatic,说明服务已恢复。

## 其他建议

- 如需更彻底,可结合组策略或注册表方法(见下文“进阶方法”)。

- 关闭自动更新可能导致安全补丁无法及时安装,请定期手动检查更新。

--组策略法(专业版适用)

1. 按 `Win + R`,输入 `gpedit.msc`,回车。

2. 依次展开:计算机配置 → 管理模板 → Windows 组件 → Windows 更新 → 管理最终用户体验。

3. 双击“配置自动更新”,选择“已禁用”,点击“应用”并“确定”。

--注册表法(家庭版适用)

1. 按 `Win + R`,输入 `regedit`,回车。

2. 定位到:

 ```

 HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows

 ```

3. 新建项 `WindowsUpdate`,在其下新建项 `AU`,新建 DWORD(32位)值 `NoAutoUpdate`,数值设为 1。

4. 重启电脑。

如需恢复自动更新,按上述恢复脚本或方法操作即可。

致谢

        非常感谢你阅读到这里!如果这篇文章对你有帮助,欢迎点赞、收藏并分享给需要的朋友。你的支持是我持续更新 Win11 实用技巧的最大动力。如果你有更好的做法或遇到问题,留言告诉我,我会尽快回复并完善内容。也欢迎关注我的主页,获取后续的脚本与懒人包更新。

本文标签: 自动更新 操作技巧 方法