Tuesday, July 12, 2016

Determining which .NET Framework versions are installed using PowerShell

If you want to determine which versions of the .NET Framework are installed on your machine, as of .NET v. 4.5, this is not so easy as in earlier releases because there are multiple iterations of this framework and they all reside in the C:\Windows\Microsoft.NET\Framework64\v4.0.30319 folder!

If you look for a solution on Microsoft's website, you will find this article: https://msdn.microsoft.com/en-us/library/hh925568

Unfortunately, it recommends writing a .NET application to determine the version of the .NET Framework installed on your machine.

But what if you want to use a PowerShell script instead?

Thankfully, one user posted a solution on StackOverflow: http://stackoverflow.com/questions/3487265/powershell-script-to-return-versions-of-net-framework-on-a-machine

You can see the resultant script here:

No comments:

Post a Comment