命令行运行Windows更新
两种方式
-
通过Powershell 通过cmd
通过Powershell
在Windows Powershell上运行Windows更新需要手动安装Windows更新模块,下载Windows更新并安装Windows更新。为此,打开Windows Powershell,在Cortana搜索框中搜索Powershell,并以管理员权限运行它。
# 安装Windows 更新模块 Install-Module PSWindowsUpdate # 获取Windows更新 Get-WindowsUpdate # 开始更新Windows Install-WindowsUpdat
通过CMD
命令提示符在Windows操作系统上存在了很长时间,而Windows Powershell是比较新的。因此,它具有运行Windows更新的类似功能,但这里突出的一点是,您不需要为Windows更新下载任何模块。 首先,在Cortana搜索框中搜索cmd,打开命令提示符,并以管理员级别的权限运行它。
# 检查更新 UsoClient StartScan # 下载更新 UsoClient StartDownload # 安装更新 UsoClient StartInstall # 安装后重启设备 UsoClient RestartDevice # 检查、下载和安装更新 UsoClient ScanInstallWait
值得注意的是,上面提到的命令提示符命令仅适用于Windows 10。对于旧版本的Windows,您需要使用以下命令wuanclt
# 检查更新 wuauclt /detectnow # 安装更新 wuauclt /updatenow # 检查及安装更新 wuauclt /detectnow /updatenow
