Skip to content

Instantly share code, notes, and snippets.

@brootware
Created August 3, 2020 03:10
Show Gist options
  • Save brootware/9183763cedb532d8c3a6082c7129eed7 to your computer and use it in GitHub Desktop.
Save brootware/9183763cedb532d8c3a6082c7129eed7 to your computer and use it in GitHub Desktop.
##############################################################
########## Register Backup and Managed Disk ##################
##############################################################
Register-AzProviderFeature -ProviderNamespace Microsoft.RecoveryServices -FeatureName RecoveryServicesResourceMove
Register-AzResourceProvider -ProviderNamespace Microsoft.RecoveryServices
Register-AzProviderFeature -FeatureName ManagedResourcesMove -ProviderNamespace Microsoft.Compute
Register-AzResourceProvider -ProviderNamespace Microsoft.Compute
do {
$getMdStatus = Get-AzProviderFeature -FeatureName ManagedResourcesMove -ProviderNamespace Microsoft.Compute
$getvaultStatus = Get-AzProviderFeature -FeatureName RecoveryServicesResourceMove -ProviderNamespace Microsoft.RecoveryServices
$getMdStatus
$getVaultStatus
Start-Sleep -Seconds 20
}
while ($getMdStatus.RegistrationState.Equals("Registering") -and $getVaultStatus.RegistrationState.Equals("Registering"))
Write-Host "Registration Completed."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment