有關PowerShell中Get-Hotfix cmdlet的有趣之處在於,它實際上只是從Win32_QuickFixEngineering中抽取出來的。所以是的,你認爲它應該被標記爲QFE,因爲它已經部分正確。
做
Get-Hotfix
和
GWMI -Class Win32_QuickFixEngineering
會給你同樣的結果。它將從cimv2 \ Win32_QuickFixEngineering返回數據集。
至於什麼可從WMI該下擴展部分,您有以下
Name MemberType Definition
---- ---------- ----------
PSComputerName AliasProperty PSComputerName = __SERVER
Caption Property string Caption {get;set;}
CSName Property string CSName {get;set;}
Description Property string Description {get;set;}
FixComments Property string FixComments {get;set;}
HotFixID Property string HotFixID {get;set;}
InstallDate Property string InstallDate {get;set;}
InstalledBy Property string InstalledBy {get;set;}
Name Property string Name {get;set;}
ServicePackInEffect Property string ServicePackInEffect {get;set;}
Status Property string Status {get;set;}
__CLASS Property string __CLASS {get;set;}
__DERIVATION Property string[] __DERIVATION {get;set;}
__DYNASTY Property string __DYNASTY {get;set;}
__GENUS Property int __GENUS {get;set;}
__NAMESPACE Property string __NAMESPACE {get;set;}
__PATH Property string __PATH {get;set;}
__PROPERTY_COUNT Property int __PROPERTY_COUNT {get;set;}
__RELPATH Property string __RELPATH {get;set;}
__SERVER Property string __SERVER {get;set;}
__SUPERCLASS Property string __SUPERCLASS {get;set;}
PSStatus PropertySet PSStatus {__PATH, Status}
ConvertFromDateTime ScriptMethod System.Object ConvertFromDateTime();
ConvertToDateTime ScriptMethod System.Object ConvertToDateTime();
InstalledOn ScriptProperty System.Object InstalledOn {get=if ([environment]::osversion.version.build -ge ...
哪個不給你,你找什麼(超出「說明」的詳細說明財產給你)
不幸的是,我不能在我的公司代理後面使用Invoke-WebRequest進行修改,因爲https://support.microsoft.com/en-us/kb/3139852需要一些額外的憑證和代理管道,但無濟於事,還有另一種方式來獲取您的信息。
來源:
https://blogs.technet.microsoft.com/heyscriptingguy/2011/08/22/use-powershell-to-easily-find-information-about-hotfixes/
得到它應該可以通過Win32_ReliabilityRecords類,然後快速破敗濾波基礎上,SOURCENAME。
$i = Get-WmiObject -Class Win32_ReliabilityRecords
$i = $i | where { $_.sourcename -match 'Microsoft-Windows-WindowsUpdateClient' }
$i.ProductName
# I broke it down into multiple operations to
# simplify for others
它給你的東西像
Update for Microsoft Office 2010 (KB2965291) 32-Bit Edition
Update for Microsoft Filter Pack 2.0 (KB2881026) 32-Bit Edition
Update for Microsoft Visual Studio 2010 Tools for Office Runtime (KB3001652)
Update for Microsoft Outlook 2010 (KB3015585) 32-Bit Edition
Update for Microsoft Office 2010 (KB2956141) 32-Bit Edition
Update for Microsoft Visio Viewer 2010 (KB2881021) 32-Bit Edition
Update for Windows 7 for x64-based Systems (KB3006625)
希望這有助於。
我喜歡你的方法..我想我可能需要做一些與我們的公司代理服務器有點不同的事情,但是你給了我一個推動我需要去做什麼的地方。謝謝! – Leptonator