Reputation: 449
I'm completely new at Powershell and trying to ultimately run a query for all systems on my domain to get name, version info, and key of all installed Microsoft/Symantec software.
Before I mess around on the domain (although if anyone can complete the query I'd be grateful), I'm trying to do it on my own machine.
So far using
Get-WmiObject -Class Win32_Product | Select-Object -Property Name, Version, IdentifyingNumber
seems to work, but it gives me all software on the system. I'm trying to add a | Where-Object {-like 'Microsoft Corporation') but I'm unaware of the correct syntax to use.
Also could anyone direct me to a good resource on how to get this to run on all machines on the domain?
Upvotes: 0
Views: 2746
Reputation: 26719
Check out the examples for Where-Object. They show how to filter properly.
Also, Get-WmiObject can be painfully slow. Better to add the filter using its Query
or Filter
parameters. Again, read the help topic for some examples.
Upvotes: 2