SolarWinds MSP is becoming N-able

Read more

Automating Your Upgrade to PowerShell 5.1

With PowerShell defaulting to version 2 or 3 on Windows 7, 8, and 8.1, it’s becoming necessary to upgrade PowerShell to version 5.1 to take advantage of its latest features. However, the number of Microsoft updates a device needs to bring it up-to-date can make the process complex.

Fortunately, Christian Oaksford from Mytech Partners created an automation policy to handle this process. This is also a recent submittal from the 2019 North American Hackathon.

The policy is available at the following link:

The policy makes the upgrade process very simple. With it you can deploy a custom service which will show a pass status if PowerShell is already up-to-date on the device. If it’s possible to upgrade PowerShell via the attached script, it will show a warning state—and if you must do the upgrade manually for any reason, it will show a failed state.

You can do the custom service with self-healing, which you can configure by opening the service and going to the self-healing tab.

The upgrade script, when run either manually or via a self-healing, will check for pre-requisites and download and upgrade .net if it’s required. It will then install the proper Microsoft update to do the PowerShell upgrade.

The upgrade script may require multiple executions due to the requirement for reboot with certain Microsoft updates. The custom service will show a progression through the various service items, what is needed and what the next step is.

If you’ve created an automation policy and would like to share it with the community, please feel free to email me at [email protected] 

As always, don’t forget to look in the Automation Cookbook at if you’re interested in other automation policies, script checks, and custom services.

Marc-Andre Tanguay is Head Automation Nerd. You can follow him on Twitter at @automation_nerd

Want to stay up to date?

Get the latest MSP tips, tricks, and ideas sent to your inbox each week.

Loading form....

If the form does not load in a few seconds, it is probably because your browser is using Tracking Protection. This is either an Ad Blocker plug-in or your browser is in private mode. Please allow tracking on this page to request a trial.

Note: Firefox users may see a shield icon to the left of the URL in the address bar. Click on this to disable tracking protection for this session/site