Skip to content

Instantly share code, notes, and snippets.

@andreaswasita
Created August 24, 2015 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreaswasita/c1e91975ce8b13d18f7c to your computer and use it in GitHub Desktop.
Save andreaswasita/c1e91975ce8b13d18f7c to your computer and use it in GitHub Desktop.
#Your Azure Subscription and Storage Account Details
$subscription = Read-Host -Prompt 'Microsoft Azure Subscription:'
$storage = Read-Host -Prompt 'Storage Account Name:'
#Set Azure Subscription and Storage
Set-azuresubscription -SubscriptionName $subscription -CurrentStorageAccountName $storage
#Barracuda Image - Check whether the image still valid using Get-AzureVMimage
$image = Get-AzureVMImage `
-ImageName "810d5f35ce8748c686feabed1344911c__BarracudaNGFirewall-6.1.1-075-byol"
#VM Config
$vm = New-AzureVMConfig -Name "azusfw01" -InstanceSize "ExtraLarge" `
-Image $image.ImageName –AvailabilitySetName "FWAS"
#Credentials
$cred=Get-Credential -Message "Type the name and password of the initial Linux account."
#Add VM Config
Add-AzureProvisioningConfig –VM $vm -Linux -LinuxUser $cred.GetNetworkCredential().Username `
-Password $cred.GetNetworkCredential().Password
#Two Ethernets Config
Add-AzureNetworkInterfaceConfig -Name "Ethernet1" `
-SubnetName "Azure-Frontend" -StaticVNetIPAddress "192.168.0.55" -VM $vm
Add-AzureNetworkInterfaceConfig -Name "Ethernet2" `
-SubnetName "Azure-Frontend" -StaticVNetIPAddress "192.168.0.56" -VM $vm
#Set Azure Subnet
Set-AzureSubnet -SubnetNames "Azure-Frontend" -VM $vm
#Reserved DIP
Set-AzureStaticVNetIP -IPAddress "192.168.0.54" -VM $vm
#New Azure VM
New-AzureVM -ServiceName "AZUSFW01" –VNetName "USVNET" –VMs $vm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment