admin管理员组文章数量:1130349
命令行更新Windows
- powershell命令行更新
- 0.安装 Windows Update module for Windows Powershell
- 导入模块
- 查看支持的参数
- 1.只下载更新
- 2.安装下载好的 Windows Update 更新
- cmd执行Windows update更新
- 1.检查更新
- 2.下载 Windows Update 更新
- 3.安装更新
- 4.安装更新后重新启动设备
- win10以下版本os命令行更新
- 1.检查更新
- 2.安装检测到的更新
powershell命令行更新
https://www.sysgeek/windows-10-update-command/
0.安装 Windows Update module for Windows Powershell
# 安装 Windows Update module for Windows Powershell:
## -Force强制安装最新版,可以用来升级
Install-Module PSWindowsUpdate -Force
导入模块
# 导入模块
Import-Module PSWindowsUpdate
查看支持的参数
# 查看该模块支持的参数
Get-Command -Module PSWindowsUpdate
| 参数 | 解释 |
|---|---|
| Clear-WUJob | 使用 Get-WUJob 清除 Task Scheduler 中的 WUJob; |
| Download-WindowsUpdate(别名 Get-WindowsUpdate –Download) | ——获取更新列表并下载它们; |
| Get-WUInstall、Install-WindowsUpdate(别名Get-WindowsUpdate –Install) | ——安装 Windows 更新; |
| Hide-WindowsUpdate(别名Get-WindowsUpdate -Hide:$false) | ——隐藏更新; |
| Uninstall-WindowsUpdate | – 使用 Remove-WindowsUpdate 删除更新; |
| Add-WUServiceManager | ——在电脑上注册更新服务器(Windows Update Service Manager); |
| Enable-WURemoting | —启用 Windows Defender 防火墙规则以允许远程使用 PSWindowsUpdate cmdlet; |
| Get-WindowsUpdate (Get-WUList) | — 显示符合指定条件的更新列表,允许您查找和安装更新。这是 PSWindowsUpdate 模块的主要 cmdlet。允许从 WSUS 服务器或 Microsoft Update 下载和安装更新。允许您在安装更新时选择更新类别、特定更新并设置计算机重启规则; |
| Get-WUApiVersion | – 获取电脑上的 Windows Update Agent 版本; |
| Get-WUHistory | – 显示已安装更新列表(更新历史); |
| Get-WUInstallerStatus | — 检查 Windows Installer 服务状态; |
| Get-WUJob | – 检查任务计划程序中的 WUJob 更新任务; |
| Get-WULastResults | — 上次搜索和安装更新的日期(LastSearchSuccessDate和LastInstallationSuccessDate); |
| Get-WURebootStatus | — 允许您检查是否需要重新启动才能应用特定更新; |
| Get-WUServiceManager | – 列出更新源; |
| Get-WUSettings | – 获取 Windows Update 客户端设置; |
| Invoke-WUJob | ——远程调用Task Scheduler中的WUJobs任务,立即执行PSWindowsUpdate命令; |
| Remove-WindowsUpdate | – 允许通过 KB ID 卸载更新; |
| Remove-WUServiceManager | – 禁用 Windows 更新服务管理器; |
| Set-PSWUSettings | – 将 PSWindowsUpdate 模块设置保存到 XML 文件; |
| Set-WUSettings | – 配置 Windows Update 客户端设置; |
| Update-WUModule | – 更新 PSWindowsUpdate 模块(您可以通过从当前模块复制或从 PSGallery 更新来更新远程计算机上的模块); |
| Reset-WUComponents | –允许您将计算机上的 Windows Update 代理重置为默认状态。 |
1.只下载更新
# 连接到 Windows Update 服务器并下载更新(如果有):
Get-WindowsUpdate –Download
2.安装下载好的 Windows Update 更新
实测该命令可以下载并安装更新
# 安装下载好的 Windows Update 更新
Install-WindowsUpdate
cmd执行Windows update更新
一条命令下载并安装Windows更新
# 检查下载并安装Windows更新
UsoClient ScanInstallWait
1.检查更新
# 检查更新
UsoClient StartScan
2.下载 Windows Update 更新
# 下载 Windows Update 更新
UsoClient StartDownload
3.安装更新
# 安装更新
UsoClient StartInstall
4.安装更新后重新启动设备
# 安装更新后重新启动设备
UsoClient RestartDevice
win10以下版本os命令行更新
一条命令下载并安装Windows更新
# 检查和安装更新
wuauclt /detectnow /updatenow
1.检查更新
# 检查更新
wuauclt /detectnow
2.安装检测到的更新
# 安装检测到的更新
wuauclt /updatenow
命令行更新Windows
- powershell命令行更新
- 0.安装 Windows Update module for Windows Powershell
- 导入模块
- 查看支持的参数
- 1.只下载更新
- 2.安装下载好的 Windows Update 更新
- cmd执行Windows update更新
- 1.检查更新
- 2.下载 Windows Update 更新
- 3.安装更新
- 4.安装更新后重新启动设备
- win10以下版本os命令行更新
- 1.检查更新
- 2.安装检测到的更新
powershell命令行更新
https://www.sysgeek/windows-10-update-command/
0.安装 Windows Update module for Windows Powershell
# 安装 Windows Update module for Windows Powershell:
## -Force强制安装最新版,可以用来升级
Install-Module PSWindowsUpdate -Force
导入模块
# 导入模块
Import-Module PSWindowsUpdate
查看支持的参数
# 查看该模块支持的参数
Get-Command -Module PSWindowsUpdate
| 参数 | 解释 |
|---|---|
| Clear-WUJob | 使用 Get-WUJob 清除 Task Scheduler 中的 WUJob; |
| Download-WindowsUpdate(别名 Get-WindowsUpdate –Download) | ——获取更新列表并下载它们; |
| Get-WUInstall、Install-WindowsUpdate(别名Get-WindowsUpdate –Install) | ——安装 Windows 更新; |
| Hide-WindowsUpdate(别名Get-WindowsUpdate -Hide:$false) | ——隐藏更新; |
| Uninstall-WindowsUpdate | – 使用 Remove-WindowsUpdate 删除更新; |
| Add-WUServiceManager | ——在电脑上注册更新服务器(Windows Update Service Manager); |
| Enable-WURemoting | —启用 Windows Defender 防火墙规则以允许远程使用 PSWindowsUpdate cmdlet; |
| Get-WindowsUpdate (Get-WUList) | — 显示符合指定条件的更新列表,允许您查找和安装更新。这是 PSWindowsUpdate 模块的主要 cmdlet。允许从 WSUS 服务器或 Microsoft Update 下载和安装更新。允许您在安装更新时选择更新类别、特定更新并设置计算机重启规则; |
| Get-WUApiVersion | – 获取电脑上的 Windows Update Agent 版本; |
| Get-WUHistory | – 显示已安装更新列表(更新历史); |
| Get-WUInstallerStatus | — 检查 Windows Installer 服务状态; |
| Get-WUJob | – 检查任务计划程序中的 WUJob 更新任务; |
| Get-WULastResults | — 上次搜索和安装更新的日期(LastSearchSuccessDate和LastInstallationSuccessDate); |
| Get-WURebootStatus | — 允许您检查是否需要重新启动才能应用特定更新; |
| Get-WUServiceManager | – 列出更新源; |
| Get-WUSettings | – 获取 Windows Update 客户端设置; |
| Invoke-WUJob | ——远程调用Task Scheduler中的WUJobs任务,立即执行PSWindowsUpdate命令; |
| Remove-WindowsUpdate | – 允许通过 KB ID 卸载更新; |
| Remove-WUServiceManager | – 禁用 Windows 更新服务管理器; |
| Set-PSWUSettings | – 将 PSWindowsUpdate 模块设置保存到 XML 文件; |
| Set-WUSettings | – 配置 Windows Update 客户端设置; |
| Update-WUModule | – 更新 PSWindowsUpdate 模块(您可以通过从当前模块复制或从 PSGallery 更新来更新远程计算机上的模块); |
| Reset-WUComponents | –允许您将计算机上的 Windows Update 代理重置为默认状态。 |
1.只下载更新
# 连接到 Windows Update 服务器并下载更新(如果有):
Get-WindowsUpdate –Download
2.安装下载好的 Windows Update 更新
实测该命令可以下载并安装更新
# 安装下载好的 Windows Update 更新
Install-WindowsUpdate
cmd执行Windows update更新
一条命令下载并安装Windows更新
# 检查下载并安装Windows更新
UsoClient ScanInstallWait
1.检查更新
# 检查更新
UsoClient StartScan
2.下载 Windows Update 更新
# 下载 Windows Update 更新
UsoClient StartDownload
3.安装更新
# 安装更新
UsoClient StartInstall
4.安装更新后重新启动设备
# 安装更新后重新启动设备
UsoClient RestartDevice
win10以下版本os命令行更新
一条命令下载并安装Windows更新
# 检查和安装更新
wuauclt /detectnow /updatenow
1.检查更新
# 检查更新
wuauclt /detectnow
2.安装检测到的更新
# 安装检测到的更新
wuauclt /updatenow
版权声明:本文标题:命令行更新Windows 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1724516072a476925.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论