posts - 104 , comments - 115 , trackbacks - 0

Powershell: Get-Framework-Versions.

This function will use the test-key function posted earlier. It will check which .NET frameworks are installed (currently only checking for .NET 4.0) but can be easily adapted and/or expanded.

function Get-Framework-Versions()
{
    $installedFrameworks = @()

    if(Test-Key "HKLM:\Software\Microsoft\NET Framework Setup\NDP\v4\Client" "Install") { $installedFrameworks += "4.0c" }
    if(Test-Key "HKLM:\Software\Microsoft\NET Framework Setup\NDP\v4\Full" "Install") { $installedFrameworks += "4.0" }  
    
    return $installedFrameworks
}

Print | posted on Wednesday, December 5, 2012 8:17 AM | Filed Under [ General Powershell ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: