Results

CMPivot Query to find out which .NetFramework version is installed.

 1,163 total views,  4 views today

 

Author: Nawaz

In this post, I will demonstrate how to pull .NET Framework installed information on machines in the collection using the SCCM Cmpivot tool.

I need to query the registry to discover which version of the .NET Framework is installed on workstations or servers.

HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full

REgistry

 

As can be seen, generic information such as “.NET Framework Version 4.8” is not visible in registry manifests, but I’ve found this information very helpful after reading a blog entry that helps me to reconstruct generic names.

After revising the CMPIVOT query I found a query that will provide me with more relevant information.

 
Operatingsystem 
| project device, Caption
| join (Registry('HKLM:\SOFTWARE\Microsoft\Net framework Setup\NDP\v4\Full') | where Property == 'Release' ) 
| project device,caption,key,value,
case
(
value == '528372','.Net frameWork 4.8',
value == '378389','.NET Framework 4.5',
value == '378675','.NET Framework 4.5.1',
value == '378758','.NET Framework 4.5.1',
value == '379893','.NET Framework 4.5.2',
value == '393295','.NET Framework 4.6',
value == '393297','.NET Framework 4.6',
value == '394254','.NET Framework 4.6.1', 
value == '394271','.NET Framework 4.6.1',
value == '394294','.NET Framework 4.6.1', 
value == '394802','.NET Framework 4.6.2', 
value == '394806','.NET Framework 4.6.2', 
value == '460798','.NET Framework 4.7', 
value == '460805','.NET Framework 4.7', 
value == '461308','.NET Framework 4.7.1', 
value == '461310','.NET Framework 4.7.1', 
value == '461808','.NET Framework 4.7.2', 
value == '461814','.NET Framework 4.7.2', 
value == '528040','.NET Framework 4.8', 
value == '528049','.NET Framework 4.8', 
value == '528372','.NET Framework 4.8',
'Need to Know Which .Net Version' )

Result

Results

 

It’s been the first time I have used the case() scalar function to evaluate a list of predicates and returns the first result expression whose predicate is satisfied. it’s same as the case function we used in the SQL query. Happy Sharing

2 thoughts on “CMPivot Query to find out which .NetFramework version is installed.”

Leave a Comment

Your email address will not be published. Required fields are marked *