Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- param(
- [String]
- $sourceAzureSubscriptionId,
- [String[]]
- $targetAzureSubscriptionIds
- )
- Select-AzureRmSubscription -Subscription $sourceAzureSubscriptionId
- $registeredProviders = Get-AzureRmResourceProvider | Where {$_.RegistrationState -eq "Registered"}
- Write-Output "These providers will be restered in target subscription:"
- $registeredProviders | foreach {
- Write-Output $_.ProviderNamespace
- }
- $targetAzureSubscriptionIds | foreach {
- Select-AzureRmSubscription -Subscription $_
- $registeredProviders | foreach {Register-AzureRmResourceProvider -ProviderNamespace $_.ProviderNamespace }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement