In order to be able to easily detect which of a group of security products is installed on a machine, I would like to be able to filter the Powershell Get-Service
output by the Company Name attached to the service, but that information is not included in the Get-Service
output. I've also tried using a Get-WmiObject
query in place of Get-Service
and still no Company Name.
I know the information is available somehow because Process Explorer shows it.
You may use
Get-Process
and filter withWhere-Object
to list process with a specific Company Name:Get-Process | Where-Object { $_.Company -eq "IBM" }
Would return any process with a company name of
IBM
exactly. You may also use any of the other comparison/regex operators to alter the fitlering:Get-Process | Where-Object { $_.Company -like "*ymantec*" }
Would return process with a company name containing
ymantec
anywhere in the string.