$myStorageAccount=""
$myLocation="China North"
$myType="Standard_LRS"
$mySubscriptionName=""
$myServiceName=""
$myVnetName=""
$mySubnetName=""
$myVMName=""
$myAvailabilitySetName=""
$myInstanceSize="Large"
$myImageName="f1179221e23b4dbb89e39d70e5bc9e72__OpenLogic-CentOS-73-20170104"
$myLinuxUser=""
$myPassword=""
Select-AzureSubscription -SubscriptionName $mySubscriptionName
New-AzureService -Location $myLocation -ServiceName $myServiceName
Set-AzureSubscription -SubscriptionName $mySubscriptionName -CurrentStorageAccountName $myStorageAccount
New-AzureStorageAccount -StorageAccountName $myStorageAccount -Location $myLocation -Type $myType
New-AzureVMConfig -Name $myVMName -InstanceSize $myInstanceSize -AvailabilitySetName $myAvailabilitySetName -ImageName $myImageName | Add-AzureProvisioningConfig -Linux -LinuxUser $myLinuxUser -Password $myPassword | Set-AzureSubnet -SubnetNames $mySubnetName | New-AzureVM -ServiceName $myServiceName -VNetName $myVnetName