How can I query PCs with PowerShell installed?
I'd like to upgrade all non-server clients in our environment to PowerShell 4.0. It is a mix of Win7 and Win8.1 devices so I only want to target the Win7 machines that have version 2.0 or 3.0 installed. I've built a Package/Program to deploy the framework package and that is working. My next challenge is to query the correct set of machines on the network. Normally I'd create a WMI query and assign those devices to the collection the app is deployed to. In this case I can't seem to build a query that finds the machines.
Installed Executable is no good as there are only a dozen or so of the 300-400 machines that appear in that search. I haven't been able to used the Registry - Name query either to look for a specific key.
Any ideas or insight into how to do this would be appreciated. I've scoured Google and have yet to find a silver bullet.
for SCCM i would set a condition against the application deployment to check against the following reg key as this identifies PowerShell version
there should be a string called Powershellversion
and you can set the condition to equal or less than 3.0
any machine running 4.0 would not be targeted this will allow you to deploy to a large collectionmachines but only those that have an older version would get the update package
To select only workstations there are many ways: WMI and LDAP always are for sure.
In my envirorment we use a machine naming convention and we keep workstations in a separate IP range.
But a SCCM collection should already be build in.