Geeks With Blogs
I, Computer
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
Posted on Wednesday, December 5, 2012 8:17 AM General , Powershell | Back to top

Comments on this post: Powershell: Get-Framework-Versions.

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © marc dekeyser | Powered by: | Join free