Windows Hotfix 管理是通过 Microsoft Windows 更新管理工具和命令行工具进行的。在 Windows 操作系统中,Hotfix 是一种用于修复操作系统缺陷、漏洞或提供安全更新的软件包。以下是与 Windows Hotfix 管理相关的常用命令分类及其功能说明。
Windows 更新独立安装程序
Windows 更新独立安装程序
wusa </? | /h | /help>
wusa <update> [/quiet] [/norestart | /warnrestart:<seconds> /promptrestart |/forcerestart] [/log:<file name>]
wusa /uninstall <update> [/quiet] [/norestart | /warnrestart:<seconds> | /promptrestart | /forcerestart] [/log:<file name>]
wusa /uninstall /kb:<KB number> [/norestart | /warnrestart:<seconds> | /promptrestart | /forcerestart] [/log:<file name>]
I?. /h, /help-显示帮助信息。
wusa update - MSU 文件的完整路径。
wusa /quiet - 安静模式,无用户交互。根据需要重启。
wusa /uninstall -安装程序将卸载程序包。
wusa /kb - 与 /uninstall 结合使用时,安装程序将卸载与 KB 数关联的程序包。
wusa /norestart -与 /quiet 结合使用时,安装程序将不启动重启。
wusa /warnrestart -与 /quiet 结合使用时,安装程序将在启动重启前向用户发出警告。
wusa /promptrestart -与/quiet 结合使用时,安装程序将在启动重启前予以提示。
wusa /forcerestart -与 /quiet 结合使用时,安装程序将强制性关闭应用程序并启动重启。
wusa /log - 安装程序将启用日志记录
Windows Hotfix 管理是通过 Microsoft Windows 更新管理工具和命令行工具进行的。在 Windows 操作系统中,Hotfix 是一种用于修复操作系统缺陷、漏洞或提供安全更新的软件包。以下是与 Windows Hotfix 管理相关的常用命令分类及其功能说明。
Windows Hotfix 管理命令分类表
| 命令/工具 | 命令描述 | 使用示例 |
|---|---|---|
| 系统信息命令 | ||
systeminfo |
显示 Windows 系统的详细信息,包括安装的 hotfix(补丁)。 | systeminfo |
| 输出将包括已安装的所有 hotfix 的详细信息,例如 KB 号、安装日期等。 | ||
| Windows 更新命令 | ||
wuauclt /detectnow |
强制 Windows 更新检测当前可用的更新。 | wuauclt /detectnow |
wuauclt /reportnow |
提交计算机的更新状态信息给 Windows 更新服务器。 | wuauclt /reportnow |
wuauclt /updatenow |
强制 Windows 更新安装最新的更新。 | wuauclt /updatenow |
powershell -Command "Get-WindowsUpdateLog" |
查看 Windows 更新日志。此命令生成并显示更新的详细日志文件,帮助诊断更新问题。 | powershell -Command "Get-WindowsUpdateLog" |
| 查看已安装的补丁 | ||
wmic qfe list |
列出所有已安装的更新(hotfix),包括更新的 KB 编号、安装日期等信息。 | wmic qfe list |
wmic qfe list full |
获取已安装更新的详细列表,包括每个 hotfix 的详细信息。 | wmic qfe list full |
wmic qfe where "HotFixID='KBxxxxxxx'" get InstalledOn |
检查特定的 hotfix 是否已安装并显示安装日期。 | wmic qfe where "HotFixID='KB1234567'" get InstalledOn |
Get-HotFix (PowerShell) |
在 PowerShell 中查看已安装的所有 hotfix 的信息。 | Get-HotFix |
| 卸载与删除更新 | ||
wusa /uninstall |
卸载已安装的 Windows 更新。可以通过指定更新的 KB 编号来卸载。 | wusa /uninstall /kb:1234567 |
wusa /quiet |
静默卸载更新,不显示用户界面。 | wusa /uninstall /kb:1234567 /quiet |
| 手动安装更新 | ||
wusa |
手动安装更新,通常用于安装 .msu 格式的 Windows 更新文件。 |
wusa C:\path\to\update.msu |
msiexec /p |
使用 MSI 命令行工具安装补丁(适用于 .msp 文件)。 |
msiexec /p C:\path\to\update.msp |
| Windows 更新服务 | ||
net stop wuauserv |
停止 Windows 更新服务(wuauserv)。 | net stop wuauserv |
net start wuauserv |
启动 Windows 更新服务(wuauserv)。 | net start wuauserv |
| 清除更新缓存 | ||
del %windir%\SoftwareDistribution\Download\* |
清除 Windows 更新下载缓存文件夹。 | del %windir%\SoftwareDistribution\Download\* |
net stop wuauserv && rmdir /s /q %windir%\SoftwareDistribution |
停止更新服务并删除软件分发文件夹,这可以清理 Windows 更新缓存。 | net stop wuauserv && rmdir /s /q %windir%\SoftwareDistribution |
| 查看更新安装历史 | ||
Get-History (PowerShell) |
获取 Windows 更新安装历史记录,查看已安装的更新详情。 | Get-History |
Get-WindowsUpdate (PowerShell) |
使用 PowerShell 获取和管理 Windows 更新,包括列出已安装的更新。 | Get-WindowsUpdate -ListInstalled |
| Windows 更新修复工具 | ||
msdt.exe /id WindowsUpdateDiagnostic |
启动 Windows 更新疑难解答工具,用于自动诊断和修复 Windows 更新相关问题。 | msdt.exe /id WindowsUpdateDiagnostic |
| 查看与安装更新的其他命令 | ||
Get-WindowsUpdate (PowerShell) |
查询并安装所有 Windows 更新。 | Get-WindowsUpdate |
Install-WindowsUpdate (PowerShell) |
使用 PowerShell 自动安装可用的更新。 | Install-WindowsUpdate -AcceptAll |
| 日志与诊断 | ||
Get-WindowsUpdateLog (PowerShell) |
查看 Windows 更新日志,通常用于诊断更新问题。 | Get-WindowsUpdateLog |
Get-WindowsUpdateError (PowerShell) |
获取 Windows 更新错误信息。 | Get-WindowsUpdateError |
说明
systeminfo命令可以用于查看系统的基本信息,包括已安装的 Hotfix。对于需要检查系统补丁安装情况的用户,systeminfo是一个非常基础且实用的命令。wmic qfe list和Get-HotFix等命令提供了查看系统中安装的所有补丁(Hotfix)信息的功能。wusa是 Windows 更新服务的主要命令,支持手动安装或卸载.msu更新文件。msiexec用于通过 MSI(Microsoft Installer)安装或卸载补丁,通常与.msp文件格式配合使用。- PowerShell 提供了强大的脚本支持,能够通过
Get-WindowsUpdate、Install-WindowsUpdate等命令管理更新。 msdt.exe用于启动 Windows 更新疑难解答工具,帮助自动修复更新相关的常见问题。
通过这些命令,用户可以有效地管理和控制 Windows 系统上的更新和 Hotfix,以确保操作系统保持最新的安全性和稳定性。
查看hotfix
`wmic qfe get hotfixid,installedon`
`Get-HotFix`
`wmic qfe list`
`Get-WmiObject -Class Win32_QuickFixEngineering`
`Get-WmiObject -Class "win32_quickfixengineering"`
`systeminfo`
`(New-Object -ComObject Microsoft.Update.Session).CreateUpdateSearcher().Search("IsInstalled=1").Updates | Select-Object Title`

浙公网安备 33010602011771号