Get list of Azure RM API versions

 ###### Resource API version play an important role in ARM template. Below script help to get list of available API versions for various providers. if you remove if statement, script will list the API versions for all the provider.
   $listProviderNameSpace=Get-AzureRmResourceProvider -ListAvailable
   foreach($provideNameSpace in $listProviderNameSpace.ProviderNamespace)
       if(($provideNameSpace -eq "microsoft.compute") -or($provideNameSpace -eq "") -or ($provideNameSpace -eq ""))
            Write-Host $provideNameSpace
            $providerList = (Get-AzureRmResourceProvider -ProviderNamespace $provideNameSpace).ResourceTypes
            foreach($providerType in $providerList.ResourceTypeName)
                Write-Host $providerType
                ((Get-AzureRmResourceProvider -ProviderNamespace $provideNameSpace).ResourceTypes | Where-Object ResourceTypeName -eq $providerType).ApiVersions

Please do let me know your thoughts/ suggestions/ question in disqus section.

Related Posts

About Ajeet Chouksey

As Technology Architect, Ajeet has over 12+ years of industry experience delivering enterprise solutions on the Microsoft Platform. Ajeet is passionate, certified technologist, blogger and community contributor. His specialisms are Azure IaaS/PaaS, Automation, DevOps, Agile based development processes supporting distributed teams (on shore & off shore), designing and implementing the appropriate infrastructure and platform solutions to meet the functional, operational, and deployment requirements throughout the solution life-cycle. Ajeet is member of various technical communities and discussion groups. He also conducted many boot camps on Azure and DevOps.