Created
December 9, 2013 08:14
-
-
Save astaykov/7868954 to your computer and use it in GitHub Desktop.
PowerShell to deploy DNS server VM to Windows Azure by specifying local DNS settings. Important are lines 6 and 11!
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
Add-AzureAccount | |
Set-AzureSubscription "[Your Subscription Name]" -CurrentStorageAccountName "[StorageAccount_for_VHDs]" | |
$adminPassword = "Super_Secret_Password!" | |
$images = Get-AzureVMImage | where {$_.Label -match "Windows Server 2012 R2"} | |
$vmImage = $images[2] | |
$dnsServerLocal = New-AzureDns –Name "NameResolver" –IPAddress "127.0.0.1" | |
New-AzureVMConfig -Name "NameResolver" -InstanceSize Large -ImageName $vmImage.ImageName ` | | |
Add-AzureProvisioningConfig –Windows –Password $adminPassword -AdminUsername "astaykov" ` | | |
Set-AzureSubnet "NSNet" ` | | |
New-AzureVM –ServiceName "nameresolver"-VNetName "VNET-DEMO-WE" -DnsSettings $dnsServerLocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment