批处理之家's Archiver

victorwoo 发表于 2014-8-25 09:54

PowerShell 技能连载 - 过滤 Hotfix 信息

原始链接:[url=http://blog.vichamp.com/powershell/tip/2014/08/21/filtering-hotfix-information/]PowerShell 技能连载 - 过滤 Hotfix 信息[/url]
发表日期:2014-08-21
[hr]
[i]适用于 PowerShell 所有版本[/i]

`Get-HotFix` 是一个用于返回已安装的 hotfix 的 cmdlet。不过它没有可以过滤 hotfix 编号的参数。

通过一个 cmdlet 过滤器,您可以很方便地查看您关注的 hotfix。这个例子只返回编号为“KB25”开头的 hotfix:[code]
Get-HotFix |
  Where-Object {
    $_.HotfixID -like 'KB25*'
  }
[/code]请注意 `Get-HotFix` 有一个 `-ComputerName` 参数,所以如果您拥有了合适的权限,那么您也可以从远程计算机中获取 hotfix 信息。


本文国际来源:[url=http://powershell.com/cs/blogs/tips/archive/2014/08/21/filtering-hotfix-information.aspx]Filtering Hotfix Information[/url]

Linuxer 发表于 2014-8-25 16:08

又学习一个实用的cmdlet,[code]Get-HotFix [/code]

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.