As for every Microsoft product, every task in Microsoft Azure can be scripted using PowerShell. This article will help you get started with the Azure CmdLets.
Checking and downloading the PowerShell Tools
To start off, you’ll need the Azure PowerShell CmdLets installed on your system to be able to run any PowerShell scripts against Azure. To check if the Azure modules are available on your system, you can use the following command:
Get-Module -ListAvailable -Name Azure*
The check is simple; if there’s no output, the Azure PowerShell tools aren’t installed. If they are installed, it looks something like this:
PS C:\Data> Get-Module -ListAvailable -Name Azure*
Directory: C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 0.0.1 AzureRM.AnalysisServices {Resume-AzureRmAnalysisServicesServer, Suspend-AzureRmAnal...
Manifest 3.1.0 AzureRM.ApiManagement {Add-AzureRmApiManagementRegion, Get-AzureRmApiManagementS...
Manifest 2.3.0 AzureRM.Automation {Get-AzureRMAutomationHybridWorkerGroup, Get-AzureRmAutoma...
Manifest 2.3.0 AzureRM.Backup {Backup-AzureRmBackupItem, Enable-AzureRmBackupContainerRe...
Manifest 2.3.0 AzureRM.Batch {Remove-AzureRmBatchAccount, Get-AzureRmBatchAccount, Get-...
...
Read More