1

我试图通过运行以下命令获取 Microsoft 所说的信息:

IWindowsUpdateAgentInfo::GetInfo

问题是,我不知道如何在 powershell 中运行这个命令。尝试以这种方式运行时,我收到以下错误消息:

[Microsoft.Update.IWindowsUpdateAgentInfo]::GetIno

Unable to find type [Microsoft.Update.IWindowsUpdateAgentInfo]: make sure that the assembly containing this type is 
loaded.
At line:1 char:1
+ [Microsoft.Update.IWindowsUpdateAgentInfo]::GetInfo
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Update.IWindowsUpdateAgentInfo:TypeName) [], RuntimeExcep 
   tion
    + FullyQualifiedErrorId : TypeNotFound

我在这里做错了什么?

4

1 回答 1

2

是一个comobject,试试这个:

[version](New-Object -ComObject Microsoft.Update.AgentInfo).            
GetInfo('ProductVersionString')      
于 2013-09-26T12:12:49.040 回答