wmi - Get List of Windows services with file version of the executable -
i trying use powershell 3.0 return list of services properties name, displayname, path, , version of executable. using following code:
get-wmiobject win32_service | ? {$_.name -like '*sharepoint*'} | select name, displayname, state, @{name="path";expression={$_.pathname.split('"')[1]}}, @{name="version";expression={((($_.pathname.split('"')[1]) | get-item).versioninfo.fileversion)}} | format-list
i back, except file version. know can break command, use custom object, etc. know doing wrong here.
any suggestions?
Comments
Post a Comment