Using PowerShell 7 in Azure Runbooks

Nathan Magyar
Mar 18, 2021
plane going through a blue azure sky
Azure is more than just a beautiful colour.

I’m a huge advocate for automation, with PowerShell and Azure being my weapon of choice. Sometimes, the built-in service offering is insufficient in achieving your desired outcome. Take today for example; I’ve proposed to a client of ours that we leverage Azure Hybrid Worker Groups to offer greater redundancy for a user export script. The problem? Azure Automation does not currently offer support for PowerShell version 7.0.

The solution? Wildly simple.

  1. Create your Azure Hybrid Worker Group as normal.
  2. Install PowerShell 7.0 on your Hybrid Worker nodes
  3. Add the below into your PoSH Runbook, with your script body existing within the command block.
Yep, that easy.

--

--

Nathan Magyar

A Systems Engineer with a passion for all things PowerShell based in Melbourne, Australia. https://www.linkedin.com/in/nathanmagyar/