(注意:所有操作必须在管理员权限下执行)
要在 PowerShell 中使用Windows Update 功能就需要先安装「Windows Update Module」:
1、安装 Windows Update module for Windows Powershell:
Install-Module PSWindowsUpdate
2、 连接到 Windows Update 服务器并下载更新(如果有):
Get-WindowsUpdate
3、安装下载好的 Windows Update 更新:
Install-WindowsUpdate
4、查看更新的历史记录:
Get-CimInstance -class win32_quickfixengineering