Find out which versions of .NET Framework you have installed across your servers…
.NET Framework goes hand in hand with Microsoft Server products nowadays. More often than not, when there’s a new version of .NET you can’t install it alongside Exchange or Skype for Business without an update from the various product teams. Back in 2017 there was a bit of a problem with .NET 4.7 on Exchange Server. The Exchange team brought in support for .NET 4.7.1 in the December 2017 quarterly updates for both 2013 and 2016 and then made it mandatory for the June 2018 quarterly releases onward. So, for hybrid customers that for support had to be on the latest or prior CU, this meant a busy period of patching for both Exchange Server and .NET Framework.
Most recently, I noticed that in the July 2018 CU for Skype for Business Server 2015 it states that it requires .NET Framework 4.5.2.
If (like me) you are still on the version of .NET Framework that ships with Server 2012 or Server 2012 R2, then you would need to perform a .NET update before applying the latest Skype CU.
So, I set about auditing my servers for .NET Framework versions to find out what work I needed to do. This is a total ball-ache. I found this helpful page on Docs to find this via the registry but decided to write a PowerShell script to query all my Skype servers to avoid logging on to each server individually.
- You need connectivity to all the servers you’re trying to query (obviously).
- You need to run this script with an account that has permissions to the servers you’re trying to query.
- You need a minimum of PowerShell version 3 because I’m using PS workflows. More about this below.
- If you’re gonna use the Get-CsPool query on line 1 you need the Skype admin tools installed.
- I’ve used Workflows in PowerShell to get the script to run as quickly as possible. Using workflows I can run the ForEach queries in parallel. As an example, in my environment when querying 20 servers around the world it took 10 seconds versus 32 seconds when running the ForEach sequentially.
- It only works for querying .NET Framework 4.5 and above.
- Change line 1 or 2 to be whatever you want to capture the servers you want to query. I used this for Skype with Get-CsPool, but you could just as easily use it for Exchange with Get-ExchangeServer or just modify the array in line 2 to be a list of individual servers.
Source for all the .NET versions: https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed