Created
December 7, 2017 08:03
-
-
Save naviat/d9f0d4c45a3a1a66263573eb7bd25367 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
New-AzureVMConfig -ImageName $image.ImageName -Name $VMName -InstanceSize Small -AvailabilitySetName $serviceName | | |
#Add VM to a domain | |
Add-AzureProvisioningConfig -EnableWinRMHttp -AdminUsername $VMUserName -Password $VMPassword -WindowsDomain -DomainUsername $DomainUserName -DomainPassword $DomainPassword -Domain $domain -JoinDomain $domain | | |
#Add a load balanced endpoint | |
Add-AzureEndpoint -Name "HTTP" -Protocol tcp -LocalPort "80" -LBSetName "HTTPforChef" -PublicPort "80" -DefaultProbe | | |
Add-AzureDataDisk -CreateNew -DiskSizeInGB 1023 -DiskLabel "Data" -LUN 0 | | |
Set-AzureSubnet -SubnetNames "Subnet-1" | | |
#Install the Chef extension | |
Set-AzureVMChefExtension -ValidationPem $chefpem -Windows -ClientRb $chefclient -RunList $runlist | | |
New-AzureVM -ServiceName $serviceName -VNetName $vnetName -Location "South Central US" -WaitForBoot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment