0

Azure DevTest Labs Artifact for installing PowerShell Core

Unless you were living under a rock, PowerShell Core general availability isn’t any breaking news.

PowerShell Core is a cross-platform (Windows, Linux, and macOS) automation and configuration tool/framework that works well with your existing tools and is optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. It includes a command-line shell, an associated scripting language and a framework for processing cmdlets.

Some time in 2016, I published the Azure DevTest Labs artifact for installing PowerShell for Linux on Azure Linux virtual machines. Similar to this, I have now created a new artifact for installing PowerShell Core on Windows VMs in Azure. This new artifact is still not in the official artifacts repository and it is in my GitHub repository. Therefore, to be able to use this, you need to fork my repository and add it as an external repository source in your Azure DevTest lab.

Once this custom repository is added, here is how you use the PowerShell Core artifact.

Select the Virtual Machines blade in the Azure DevTest Labs.

Click the VM, and then click on Artifacts and Apply Artifacts. In the search box, type PowerShell Core, and then click on the result in the Apply Artifacts blade.

Click on the artifact and supply the parameters required.

Package URL – The MSI URL for installing PowerShell Core. You can retrieve this from https://github.com/PowerShell/PowerShell/releases.

Install C runtime for Windows OS prior to Windows Server 2016? – Select True for Windows Server 2012 R2 or select False. This is needed for Windows Server 2012 R2 if you want to use WinRM for PowerShell remoting.

Click Add. This artifact installation might take a few minutes and once complete, you can access the install script verbose logs.

This is it. You can, of course, install these artifacts (Windows or Linux) at the time of Azure DTL VM provisioning itself. And, you can do this deployment via an ARM template as well.

At the end of this template deployment, you will have a Windows Server 2016 VM with PowerShell Core installed.

Filed in: Articles, Azure, Online Only Tags: , , , ,

Leave a Reply

Submit Comment

© 1920 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: