Before running any Azure PowerShell command you need to install the Azure PowerShell SDK on your machine. To check if you already have this installed run the command:
PS C:\> Get-Module -ListAvailable Azure
Directory: C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Manifest 1.0.1 Azure {Disable- AzureServiceProjectRemoteDesktop, Enable-AzureSer... PS C:\>
If the above command returns no data, then you need to install the SDK before proceeding. You can install the SDK in either of two ways, either via PowerShell Gallery or via Web PI.
Option 1 – Using PowerShell Gallery
# Install the Azure Resource Manager modules from PowerShell Gallery
Install-Module AzureRM
Install-AzureRM
# Install the Azure Service Management module from PowerShell Gallery
Install-Module Azure
# Import AzureRM modules
Import-AzureRM
# Import Azure Service Management module
Import-Module Azure