Excalidraw绘图元素支持自定义行为脚本扩展
2025/12/22 3:08:26
在企业计算机管理中,我们可以利用 PowerShell 和 WMI (Windows Management Instrumentation)来完成多种任务,以下是一些常见操作的介绍。
可以使用Test-HotfixInstallation脚本来确定特定系统上是否安装了热修复。示例代码如下:
param( $hotfix = $(throw "Please specify a hotfix ID"), $computer = "." ) ## Create the WMI query to determine if the hotfix is installed $filter = "HotFixID='$hotfix'" $results = Get-WmiObject Win32_QuickfixEngineering ` -Filter $filter -Computer $computer ## Return the results as a boolean, which tells us if the hotfix is installed [bool] $results使用示例:
PS >Test-HotfixInstallation KB925228 LEE-DESK True PS >Test-Hot