PowerShell version by OS

Powershell version

I am working on automating some administrative functions and wanted to leverage Powershell coding. But, my servers come in a variety of flavors: 2008R1, 2008R2, 2012R1, and 2012R2. So, I wondered, what version of Powershell do I have available on each, and can it be upgraded? Googling, and found a reference to the original versions that were deployed per OS:

  • Windows 2008R1 == Powershell 1.0
  • Windows 2008R2 == Powershell 2.0
  • Windows 2012R1 == Powershell 3.0
  • Windows 2012R2 == Powershell 4.0

Note that there is a lot of functionality difference between version 1.0 and 2.0 — many commands I lookup are unavailable in version 1.0. So, I was highly motivated to have at least version 2.0 available to me, if not a more recent version.

  1. Check Powershell version:
    • Run Powershell
    • $psversiontable.psversion
  2. Check OS version:
    • Run cmd.exe
    • Ver

And, surprisingly, I do have 2.0 already available to me on both 2008R2 and my 2008R1 32-bit servers. Can I get something more recent? Yes, turns out version 3.0 can be downloaded directly from Microsoft and installed on both 2008R1 and 2008R2. A prerequisite for the installation is having the .NET framework 4.0 or 4.5 already preinstalled, otherwise you will received the nondescriptive error message, “This update is not applicable to your computer”.

Download version 3.0 from MS: https://www.microsoft.com/en-us/download/details.aspx?id=34595

But, there are some caveats: don’t upgrade if you are running any of the following solutions on your servers:

  • System Center 2012 Configuration Manager
  • System Center Virtual Machine Manager
  • Microsoft Exchange Server 2007 and Microsoft Exchange Server 2010
  • Microsoft SharePoint 2010
  • Windows Small Business Server 2008 and Windows Small Business Server 2011

All excited about the version 3.0 upgrade, I wondered if I could upgrade to version 4.0? Alas, no, Windows 2008R1 is not supported. Once I get rid of those servers, then I could upgrade to version 4.0 on the 2008R2 and 2012R1 servers. See the download link for further information.

Download version 4.0 from MS: https://www.microsoft.com/en-us/download/details.aspx?id=40855

Also, notice that there are a list of solutions incompatible with version 4.0, so you shouldn’t install if you are running these:

  • System Center 2012 Configuration Manager (not including SP1)
  • System Center Virtual Machine Manager 2008 R2 (including SP1)
  • Microsoft Exchange Server 2007 and Exchange Server 2010 SP1/SP2
  • Windows Small Business Server 2011 Standard

Notice that if you are running Exchange Server 2010, you should upgrade to SP3 RU5 before installing Powershell 4.0, but because Exchange relies heavily on Powershell I’m not really convinced this is a great idea. Instead, I’d really recommend installing Exchange Server 2013 CU12 on a fresh 2012R2 machine (which comes with Powershell version 4.0) and go forward with that configuration.