
close
close
In this Ask the Admin, I’ll show you how to connect to your Azure subscription using PowerShell and create a new virtual machine (VM) using the New-AzureQuickVM command.
Before you can use PowerShell to remotely manage Windows Azure, you will need to set up remote PowerShell management for Windows Azure.
advertisment
Let’s start by setting the Azure subscription in PowerShell. Open a PowerShell prompt with elevated privileges:
Now that the subscription is set, chose an image from the gallery to use as the basis for the new VM.
Finally, create the VM. Run the command shown below, replacing the –AdminUsername and –Password parameters with any username and password that you choose. The –ServiceName and –Name parameters can be the same.
Each VM should run in its own cloud service, unless you plan to load balance one or more VMs. You might need to experiment with the –ServiceName parameter to successfully create a new VM, as it should be globally unique. It’s often the case that you will specify an already existing cloud service name.
advertisment
The –location parameter can be set to East Asia, Southeast Asia, North Europe, West Europe, Central US, East US, East US 2, or West US.
https://petri.com/create-virtual-machine-in-windows-azure-powershell New-AzureQuickVM -Windows -ServiceName mysrv1 -Name mysrv1 -ImageName a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201311.01-en.us-127GB.vhd -AdminUsername mysrv1admin –Password ********* -location “North Europe”
If you look in the Azure management portal window under virtual machines, you should now see an entry for the new VM. It can take up to five minutes for the provisioning process to complete.
More from Russell Smith
advertisment
Petri Newsletters
Whether it’s Security or Cloud Computing, we have the know-how for you. Sign up for our newsletters here.
advertisment
More in Cloud Computing
Use Azure ExpressRoute Private Peering & Azure Virtual WAN to Connect Privately to Microsoft 365
Apr 21, 2022 | Flo Fox
Microsoft to Make Changes to Cloud Licensing Restrictions after Customer Complaints
Apr 18, 2022 | Rabia Noureen
Most popular on petri
Log in to save content to your profile.
Article saved!
Access saved content from your profile page. View Saved
Join The Conversation
Create a free account today to participate in forum conversations, comment on posts and more.
Copyright ©2019 BWW Media Group