Azure Exam Tips Part 2 – Create an Azure VM using the Azure CLI

Tip #2 – I need to know how to create a Virtual Machine from the Azure CLI . I need to practice these exams tips regularly in order to try to remember them.

Create a new Resource Group with a name and location, then do az vm create and then do az vm open-port  passing in 5 parameters.

So the points to note for Creating a VM in Azure using the CLI are the following key points:-

Create a VM using Azure CLI (know the order) 5 parameters

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-cli

  • az group create –name GregorExamsRG –location westeurope
  • az vm create \
    –resource-group GregorExamsRG \
    –name myVM \
    –image win2016datacenter \
    –admin-username azureuser \
    –admin-password ThisisMyPassword123$
  • az vm open-port –port 80 –resource-group GregorExamsRG –name myVM

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s