Created
September 23, 2018 04:19
-
-
Save leniency/b39740b42edac77fda037b81678de4ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ResourceLocation = "Global" | |
$ResourceGroup = "RESOURCE GROUP" | |
$ResourceName = "DOMAIN NAME" | |
$PropertiesObject = @{ | |
'Consent' = @{ | |
'AgreementKeys' = @("DNPA","DNTA"); | |
'AgreedBy' = 'IP ADDRESS'; | |
'AgreedAt' = '2017-04-23T04:07:00.0000000Z'; | |
}; | |
'authCode' = 'AUTH CODE'; | |
'Privacy' = 'true'; | |
'autoRenew' = 'true'; | |
} | |
# May need this first - sometimes the powershell provider isn't loaded. | |
Register-AzureRmResourceProvider -ProviderNamespace "Microsoft.DomainRegistration" | |
New-AzResource -ResourceName $ResourceName -Location $ResourceLocation -PropertyObject $PropertiesObject -ResourceGroupName $ResourceGroup -ResourceType Microsoft.DomainRegistration/domains -ApiVersion 2015-02-01 -Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Powershell script to transfer a domain into Azure.
Original, one modification to add the resource provider.
https://social.msdn.microsoft.com/Forums/azure/en-US/271731d8-6cd2-443b-b861-ee4ee30e34e9/transfer-domain-registration-to-azure