Skip to content

Instantly share code, notes, and snippets.

@mrik23
Created August 5, 2017 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrik23/7d3ca400067359a812a1b5803855c077 to your computer and use it in GitHub Desktop.
Save mrik23/7d3ca400067359a812a1b5803855c077 to your computer and use it in GitHub Desktop.
A simple PowerShell script using Azure PowerShell to check the registration of a service provider and register it.
#Azure PowerShell v2
#Check documentation https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0
Import-Module AzureRM
$credential = Get-Credential
Login-AzureRmAccount -Credential $credential
#List all resource providers enabled
Get-AzureRmResourceProvider -ListAvailable | format-table
#Check the status of a service provider
Get-AzureRmResourceProvider -ListAvailable | Where-Object ProviderNameSpace -Match "keyvault"
#Check the status of a service provider
Get-AzureRmResourceProvider -ListAvailable | Where-Object ProviderNameSpace -Match "keyvault" | Register-AzureRmResourceProvider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment