Azure Resource Manager via PowerShell

Alberto De Natale
2 min readMay 14, 2019

--

The “Azure Resource Manager” is a deployment and management service for Azure. It is a layer that allows to create update and delete resources.

Being all the requests handled by the same API, results and capabilities are consistent.

Azure PowerShell provides a set of cmdlets that allows using the Azure Resource Manager. It may be usable either from inside the portal or from the local desktop. There are two implementations of Azure Powershell, the more recent Az module and the legacy AzureRM.

Install Azure PowerShell

Open a PowerShell prompt from your desktop and check the version running is at least the 5.1. This can be done by running:

Install-Module -Name Az -AllowClobber -Scope CurrentUser

Azure Cmdlets naming conventions

PowerShell uses a verb-noun pair for names of the cmdlets and their derived Microsoft .NET Framework classes.

The verb part of the name identifies the action performed.

The noun part of the name identifies the entity on which the action is performed.

Common Azure Cmdlets verbs

New vs Set

The New verb is used to create a new resource. The Set verb is used to update a resource

Find vs Search

Find is used to look for an object. Search is used to create a reference to a resource in a container.

Get vs Read

The Get verb is used to retrieve a resource. The Read verb is used to get information from a source.

Invoke vs Start

Invoke is used to perform operations that are synchronous. Start is used to begin an operation that is asynchronous.

Conclusions

Automating processes using command line scripts will require some familiarity with PowerShell scripting. Consistency in the design of the resource management module will allow to learn concepts once and reuse them everywhere.

--

--

Alberto De Natale
Alberto De Natale

Written by Alberto De Natale

Alberto De Natale is a passionate tech-enthusiast software developer.

No responses yet