Powershell cmdlet列表服务制造商

时间:2013-09-22 01:20:13

标签: powershell

有没有办法在powershell中列出服务的制造商?

enter image description here

1 个答案:

答案 0 :(得分:1)

它隐藏在pathname属性指向的文件的versioninfo属性中。此外,pathname属性似乎在值中有引号。

这有助于获得第一个。可能不适用于所有人:

get-childitem -path ((get-wmiobject win32_service | select-object -first 1 -expand pathname) -replace '"','')| select-object -expand VersionInfo | select-object -expand CompanyName