Azure PowerShell Commands (111 Commands)

Check out the list of a few important Azure PowerShell Commands with examples and Video tutorials. Along with that, check out the Lists of real-time Azure PowerShell errors and their solutions with video tutorials that I got while working with these PowerShell commands.

NameDescription
Get-AzureADDeviceCan help you to retrieve the details of the lists of devices from your Azure AD.
New-AzureADDeviceHelps you to create a brand new device in your Azure Active Directory.
Set-AzureADDeviceUpdates the details of your Azure AD device.
Remove-AzureADDeviceRemove an Azure AD device.
Get-AzureADPolicyRetrieve the details of your Azure AD Policy.
New-AzureADPolicyCreate a brand new Azure AD Policy using this PowerShell command.
Set-AzureADPolicyUpdate your Azure AD Policy.
Remove-AzureADPolicyDelete any unwanted Azure AD policy using this PowerShell command.
Get-AzureADDirectoryRoleRetrieve the details of a directory role from your Azure Active Directory using this command.
Update-AzADUserUpdate the entities in the Azure Active Directory users.
Get-AzureADObjectByObjectIdThis command will retrieve the details of a directory role from your Azure Active Directory.
Disconnect-AzureADHelps you to disconnect your current session from your Azure Active Directory tenant.
Connect-AzureADHelps you to use Azure AD cmdlet requests by connecting with an authenticated account.
Get-AzureADUserMembershipUse this command to get the specified user membership in the Azure AD.
Get-AzureADUserHelps you to get user details from your Azure Active Directory.
Get-AzADUserCan get you the list of AD users.
Remove-AzADGroupUse this command to remove the entity from the Azure AD groups.
Get-AzADApplicationHelps get the objects’ details based on the specified Object IDs.
New-AzADApplicationUse the New-AzADApplication PowerShell cmdlet to add the new entity to your applications.
Get-AzADGroup Use this command to get the lists of Azure Active Directory Groups.
Get-AzSecuritySettingIt will get you the security settings in the Azure Security Center.
Get-AzTenantGet the list of entities from the applications.
New-AzTagIt helps you quickly create a predefined Azure tag.
Get-AzTagCan help you to retrieve the lists of predefined Azure tags from your subscription.
Add-AzRouteConfigUse this command to add a route to a specified Azure route table.
Get-AzRouteTableThis can help you to retrieve the route tables under a Resource Group.
Get-AzStorageContainerHelps you to retrieve the lists of Azure storage containers.
Remove-AzStorageContainerHelps you to remove the storage container that you have specified with this command.
New-AzStorageContextGet the lists of storage queues associated with the specified storage account.
Get-AzADServicePrincipalUse this command to get the entities from the service principals.
New-AzADSpCredentialIt helps you to add a credential to an existing service principal.
Update-AzConfigUpdate the configs of your Azure PowerShell using this command.
Uninstall-AzureRmHelps you to uninstall or remove all the AzureRm modules from your machine
Set-AzDefaultHelps you to create an Azure Storage context quickly.
Save-AzContextCan help you to save the Az context of your current Azure session into a specified location or path.
Get-AzEnvironmentRetrieve the endpoints and the metadata for the instance of the Azure services.
Get-AzProviderFeatureUse this command to add edit or set the default to your current Azure Context.
Get-AzPolicyAssignmentRetrieve the policy assignments.
Clear-AzDefaultHelps to clear the current context default values set by the user.
Clear-AzConfigHelps you to retrieve the feature details like Feature name, Registration State, Provider name, etc. in a second.
New-AzManagementGroupClear all the configuration values set by the user using this command.
Set-AzResourceGroupCreate a management group in seconds using this command.
Remove-AzResourceRemoves the specified Azure resource.
New-AzRoleAssignmentHelps you to assign an RBAC role to a specific principal for a specified scope.
Remove-AzResourceLockRemoves a lock from an Azure resource.
New-AzResourceModify your Azure resource group in seconds.
Export-AzResourceGroupSave your resource group as a template with a JSON file format.
Get-AzRoleDefinitionRetrieve the list of Azure RBAC roles that are available that you can assign.
Get-AzRoleAssignmentQuickly create an Azure resource like a website or an Azure SQL database/server in a resource group.
Get-AzResourceProviderQuickly get the Azure resource provider.
Get-AzResourceLockRetrieve the Azure resource locks.
Get-AzResourceGet a list of all the Azure resources.
Get-AzConfigRetrieve the lists of all the configs of your Azure PowerShell.
Get-AzContextRetrieve the metadata details.
Add-AzureAccountAdd the Azure account to the Windows PowerShell.
Set-AzContextIt helps you set the subscription, tenant, and environments for different PowerShell commands for your current PowerShell session.
connect-AzAccountIt helps you help you connect to Azure with one particular authenticated account.
Disconnect-AzAccountDisconnect an Azure account that you are connected to currently.
Clear-AzContextDelete/clear all the Azure credentials, subscription and account details, etc.
Get-AzLocationRetrieve the location details and their supported resource providers.
Get-AzDeploymentRetrieve the deployment details under the current subscription.
Start-ADSyncSyncCycleHelps to force Sync Azure AD Connect or to run a sync cycle manually.
Get-AzureADMSGroupGet the details of the Azure AD groups via the MS Graph.
Set-AzureADMSGroupModify different properties of the Azure AD group.
Get-AzureADServicePrincipalRetrieve the list of service principals from your Azure Active Directory.
Get-AzureADMSDeletedDirectoryObjectGet the soft deleted AD object from the Azure Active Directory.
Get-AzSubscriptionRetrieve the List of Azure Subscriptions.
Get-azurermsubscriptionGet the subscription details that the current account can access.
Connect-AzureRMAccountHelps to connect to the authenticated account for using the Azure RM cmdlets.
Select-AzureSubscriptionCan get you the lists of all the role assignments under your subscription or a specific scope.
New-AzureADMSInvitationCan help you to invite an external user to your Azure Active directory.
Connect-msolserviceCan help you to initiate a connection to your Azure Active Directory.
Get-AzMetricCan help you to retrieve the metric values of an Azure resource.
Get-AzSqlDatabaseHelp you to set and clear your current and default Azure subscriptions.
Get-AzSqlServerHelp you retrieve the Azure SQL database lists from your Azure SQL Database Server.
Get-AzStorageTableCan help you to create a storage table quickly.
Set-AzStorageAccountUse this Azure PowerShell command to modify or update your Azure Storage account.
Get-AzActivityLogCan help you to get the lists of available storage tables associated with the specified Storage account.
Get-AzADGroupMemberHelp you retrieve the Activity Log event lists from your Azure Subscription.
New-AzADGroupCan help you to create a new Azure AD group.
New-AzADUserCan help you to create a new Azure AD user.
Add-AzADGroupMemberHelps you to add members to an Azure AD group.
Get-AzADAppCredentialHelp you to list the members from an Azure AD group.
Start-AzVMIt helps to start your Azure VM.
Get-AzWebAppIt helps you to retrieve information about your Azure Web App.
Set-AzWebAppIt can help you modify your Azure Web App.
Get-AzApplicationInsightsIt helps you to return the Application Insights components.
Get-AzAppServicePlanIt helps to retrieve an Azure App Service plan in the resource group that you have specified.
Get-AduserIt helps you quickly find the AD users in your domain.
Get-AzVirtualNetworkIt helps you helps to retrieve the lists of virtual networks under a resource group.
Get-AzVirtualNetworkSubnetConfigIt helps you to retrieve the details of a subnet inside a Virtual network.
New-AzAppServicePlanIt helps you retrieve the details of a subnet inside a virtual network.
Get-AzKeyVaultSecretIt can help you quickly create an App service plan for a specific region.
Get-AzDiskIt helps you to retrieve the properties of a Managed disk.
Name Description
Azure Powershell change subscriptionLearn how the Select-AZSubscription command can be used to change the Azure subscription.