Share:
Twitter
LinkedIn
Facebook
Google+
Reddit
Whatsapp
Follow by Email

I am not sure if you know, but the Azure Cloud Shell now runs PowerShell Core. This means that the old AzureRM PowerShell module is not compatible. Luckily Microsoft has released a new PowerShell module that has been built to harness the power of PowerShell Core and the Cloud Shell, whilst still maintaining compatibility with PowerShell 5.1. This new module is called Az. This new module is already available in the Cloud Shell and also can be installed from the PowerShell Gallery

Features of the module.

  • Runs on both PowerShell 5.1 and PowerShell Core.
  • Is always up to date with the latest Azure tooling.
  • Already in the Cloud Shell.
  • Makes commands shorter.
  • Data plane and management plane cmdlets will use the same Az module.
  • Comes with cmdlet to enable script compatibility with AzureRM (Enable/Disable-AzureRMAlias).

Where can I run it?

  • PowerShell 5.1 – Windows 7 or greater as long as .Net 4.7.2 or greater is installed.
  • PowerShell Core 6.0 or greater – Windows, Mac OS, Linux

Enough chat lets Install.

Yup that’s it! It’s not hard at all.

Warning


You should not install Az side-by-side with AzureRM. Remove all AzureRM modules before installing Az. This can be done using this link https://docs.microsoft.com/en-us/powershell/azure/uninstall-azurerm-ps?view=azurermps-6.10.0

Compatibility with AzureRM

So now all of my scripts are broken. Not to worry. the next command will fix this.

To remove the AzureRM cmdlet aliases just use the following.

Let’s look at the difference.

AzureRM Module NameAz Module Name
AzureRMAz
Azure.AnalysisServicesAz.AnalysisServices
Azure.StorageAz.Storage
AzureRM.AksAz.Aks
AzureRM.AnalysisServicesAz.AnalysisServices
AzureRM.ApiManagementAz.ApiManagement
AzureRM.ApplicationInsightsAz.ApplicationInsights*
AzureRM.AutomationAz.Automation
AzureRM.BackupAz.Backup***
AzureRM.BatchAz.Batch
AzureRM.BillingAz.Billing
AzureRM.CdnAz.Cdn
AzureRM.CognitiveServicesAz.CognitiveServices
AzureRM.ComputeAz.Compute
AzureRM.Compute.ManagedServiceAz.Compute.ManagedService***
AzureRM.ConsumptionAz.Consumption*
AzureRM.ContainerInstanceAz.ContainerInstance*
AzureRM.ContainerRegistryAz.ContainerRegistry*
AzureRM.DataFactoriesAz.DataFactory
AzureRM.DataFactoryV2Az.DataFactory
AzureRM.DataLakeAnalyticsAz.DataLakeAnalytics
AzureRM.DataLakeStoreAz.DataLakeStore
AzureRM.DataMigrationAz.DataMigration
AzureRM.DeviceProvisioningServicesAz.DeviceProvisioningServices*
AzureRM.DevSpacesAz.DevSpaces
AzureRM.DevTestLabsAz.DevTestLabs
AzureRM.DnsAz.Dns
AzureRM.EventGridAz.EventGrid
AzureRM.EventHubAz.EventHub
AzureRM.HDInsightAz.HDInsight**
AzureRM.InsightsAz.Insights*
AzureRM.IotHubAz.IoTHub
AzureRM.KeyVaultAz.KeyVault
AzureRM.LogicAppAz.LogicApp***
AzureRM.MachineLearningAz.MachineLearning
AzureRM.MachineLearningComputeAz.MachineLearningCompute*
AzureRM.ManagedServiceIdentityAz.ManagedServiceIdentity*
AzureRM.ManagementPartnerAz.ManagementPartner*
AzureRM.MapsAz.Maps
AzureRM.MarketplaceOrderingAz.MarketplaceOrdering*
AzureRM.MediaAz.Media
AzureRM.NetworkAz.Network*
AzureRM.NotificationHubsAz.NotificationHubs*
AzureRM.OperationalInsightsAz.OperationalIsights
AzureRM.PolicyInsightsAz.PolicyInsights*
AzureRM.PowerBIEmbeddedAz.PowerBIEmbedded*
AzureRM.ProfileAz.Profile*
AzureRM.RecoveryServicesAz.RecoveryServices**
AzureRM.RecoveryServices.BackupAz.RecoveryServices**
AzureRM.RecoveryServices.SiteRecoveryAz.RecoveryServices**
AzureRM.RedisCacheAz.RedisCache**
AzureRM.RelayAz.Relay*
AzureRM.ReservationsAz.Reservations*
AzureRM.ResourcesAz. Resources
AzureRM.SchedulerAz.Scheduler***
AzureRM.SearchAz.Search
AzureRM.SecurityAz.Security*
AzureRM.ServiceBusAz.ServiceBus
AzureRM.ServiceFabricAz.ServiceFabric**
AzureRM.SignalRAz.SignalR
AzureRM.SqlAz.Sql
AzureRM.StorageAz.Storage
AzureRM.StorageSyncAz.StorageSync
AzureRM.StreamAnalyticsAz.StreamAnalytics
AzureRM.SubscriptionAz.Subscription*
AzureRM.TagsAz.Tags*
AzureRM.TrafficManagerAz.TrafficManager*
AzureRM.UsageAggregatesAz.UsageAggregates
AzureRM.WebsitesAz.Websites

* Module name may change for 1.0

** Module not yet available

*** Module may not appear in 1.0

Time to try one out.

As you can see the new commands are the same but with Az and not AzureRM.

<strong>Critical Note</strong>

At the time of writing this article this is still in preview. It should be fully GA end of 2018.

I hope you found this article helpful. If you have any questions please reach out.

Share:
Twitter
LinkedIn
Facebook
Google+
Reddit
Whatsapp
Follow by Email

Pixel Robots.

I’m Richard Hooper aka Pixel Robots. I started this blog in 2016 for a couple reasons. The first reason was basically just a place for me to store my step by step guides, troubleshooting guides and just plain ideas about being a sysadmin. The second reason was to share what I have learned and found out with other people like me. Hopefully, you can find something useful on the site.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

I agree