2

I am trying to create create a query in SCCM to show how many computers are installed with the different Powershell-versions. I suspect we have a mix of v2,v3 and v4, but I need to know how many and their computer names. Does anyone know how I can accomplish this? I couldnt find anything about this online.

I would prefer a query because I dont want to make a report (I am not comfertable with the report builder in SCCM 2012).

PowerShellGirl
  • 23
  • 1
  • 1
  • 5
  • Have you done much with creating custom collections yet? – Colyn1337 Nov 24 '15 at 15:54
  • Yes I've done that, but that will also require a query? – PowerShellGirl Nov 25 '15 at 07:54
  • Good question. [This Q&A](https://stackoverflow.com/questions/29665724/determine-powershell-version-remotely-via-wmi) makes me think there isn't a WMI query that easily reveals the WMF version. I _think_ installations of WMF versions higher than the one in the RTM have all been distributed as Windows Updates. For example, WMF 4 for Windows 7 [is KB2819745](https://support.microsoft.com/en-us/kb/2819745). If that is the case you should be able to infer WMF version from the OS version and whether any of the WMF updates is installed. – alx9r Nov 26 '15 at 02:45

1 Answers1

2

You can do this if you enable the Software Inventory function in your client settings. By default SINV disables scanning of C:\Windows so you need to re-enable the Powershell path %windir%\System32\WindowsPowerShell\v1.0
After that, you can create Queries or Collections that leverage the "Softare Files" attribute class to see what you have. So far I've mapped out the following values & version numbers.

v1,2 Less Than 6.2
v3   Like      6.2.%
v4   Like      6.3.%

Clientsettings ClientSettings2 QueryCriteria

Clayton
  • 4,523
  • 17
  • 24