Upgrading from PowerShell 2.0

This is a step by step tutorial for updating from PowerShell 2.0 to a newer version. The document provides details on how to do the update as well as how to troubleshoot.

❗️

Windows 2008 R2 and Below

Liongard no longer supports Agents deployed on Windows Server versions 2008 R2 and below.

What version of PowerShell am I running?

To determine what version of PowerShell you are running on your server, open a PowerShell console and enter the following command:

$PSVersionTable.PSVersion

Which version of PowerShell does Liongard support?

Liongard recommends using a stable version of PowerShell, in particular, 5.1 is very stable and well tested. The minimum PowerShell version required is 3.0, and Liongard recommends you verify that no application on your server has a hard requirement on PowerShell 2.0 before upgrading.

Will upgrading Windows PowerShell break any of my applications?

Unfortunately, the answer is that it might. Some applications with a dependency on Powershell 2.0 are listed below but this is not an exhaustive list and we recommend you consult with the application's documentation.

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

How do I update from PowerShell 2.0?

In this example, we will be updating an old 2008 R2 server from PowerShell 2.0 to 5.1. The same set of commands apply regardless of the version you are choosing.

  1. Log in to the host server
  2. Download the new 5.1 Windows Management Framework at https://www.microsoft.com/en-us/download/details.aspx?id=54616
  1. Follow the instructions provided by Microsoft's Documentation.

Troubleshooting

📘

Reboot Required

Please make sure you reboot your server after you perform the upgrade. Reboots are required when updating Windows Management Framework.

📘

Verify the Update

If you run the update in quiet mode, it may appear to succeed but fail silently. In order to verify the upgrade was successful, there are several commands you can run from PowerShell.

To check the PowerShell version you can run the following command:
$PSVersionTable.PSVersion

To check if the update was installed you can run the following commands:
wmic qfe get hotfixid | find "KB3191565"
echo %ERRORLEVEL%

Both commands should provide output and the ERRORLEVEL should output 0.