Let's Connect
  • Sales Chat
  • Remote Session
  • 877-394-4368 877-394-4368
  • Login
  • IT Consulting
  • Software Development
  • Cloud
  • About
  • Contact
  • Support
Menu
  • IT Consulting
  • Software Development
  • Cloud
  • About
  • Contact
  • Support
Search
Login
  • All Posts

Archives

View Archives
  • 2020
  • 2019
  • 2018
  • 2017
  • 2016
  • 2020
  • 2019
  • 2018
  • 2017
  • 2016

Categories

Categories
  • Announcements
  • Apple
  • Applications
  • Arctic Wolf Networks
  • Azure
  • Backup and Disaster Recovery
  • Business Continuity
  • BYOD
  • Cloud Computing
  • Compliance
  • Coronavirus
  • COVID-19
  • Cryptocurrency
  • Customer Service
  • Cybersecurity
  • DFARS
  • Dynamics NAV Hosting
  • Firewall-as-a-Service
  • HIPAA
  • iOS
  • IT Best Practices
  • IT Expenses
  • IT Outsourcing
  • IT Security
  • Legal Vertical
  • Linux
  • Managed IT Services
  • Medical, EMR, EHR
  • Microsoft Azure
    • Powershell
  • Microsoft Power Platform
  • Mobile
  • Mobile Computing
  • New Jersey
  • New York City (NYC)
  • Office 365
  • PCI
  • Rancho Cucamonga Location
  • Rant
  • Regulatory Compliance
  • SharePoint
  • SiteLink
  • Small Business
  • SOCaaS
  • Software Development
  • Sort of Technical
  • Tools/Utilities
  • Troubleshooting
  • Ubuntu
  • Uncategorized
  • Very Technical
  • Virtualization
  • Windows Surface
  • Windows Virtual Desktop (WVD)
  • Announcements
  • Apple
  • Applications
  • Arctic Wolf Networks
  • Azure
  • Backup and Disaster Recovery
  • Business Continuity
  • BYOD
  • Cloud Computing
  • Compliance
  • Coronavirus
  • COVID-19
  • Cryptocurrency
  • Customer Service
  • Cybersecurity
  • DFARS
  • Dynamics NAV Hosting
  • Firewall-as-a-Service
  • HIPAA
  • iOS
  • IT Best Practices
  • IT Expenses
  • IT Outsourcing
  • IT Security
  • Legal Vertical
  • Linux
  • Managed IT Services
  • Medical, EMR, EHR
  • Microsoft Azure
    • Powershell
  • Microsoft Power Platform
  • Mobile
  • Mobile Computing
  • New Jersey
  • New York City (NYC)
  • Office 365
  • PCI
  • Rancho Cucamonga Location
  • Rant
  • Regulatory Compliance
  • SharePoint
  • SiteLink
  • Small Business
  • SOCaaS
  • Software Development
  • Sort of Technical
  • Tools/Utilities
  • Troubleshooting
  • Ubuntu
  • Uncategorized
  • Very Technical
  • Virtualization
  • Windows Surface
  • Windows Virtual Desktop (WVD)

Microsoft
Cisco
HP
Lenovo
StorageCraft
VMware
Extreme Networks
Dell PartnerDirect
SonicWall
Home "On IT" Blog January 3rd, 2017

Provisioning and Tearing Down Azure Virtual Machines

Automating Azure VM deployment(s)

Posted on January 3rd, 2017 in Microsoft Azure, Powershell



This article describes automating the process of provisioning an Azure VM (Virtual Machine) and tearing it down. Before we start, let’s clarify few terms:

Azure

When we talk about Azure it is understood that we’re talking about Microsoft’s public cloud offering. This is sometimes referred to as Azure commercial. In Powershell, this is referred to AzureCloud. Microsoft has separate clouds from Azure such Azure US GOV cloud for US Government organizations (not available to the public).

ARM vs ASM

Azure has two APIs/modes;

  • ASM (Azure Service Management) also referred to as ‘classic’. This can be managed from the classic portal at https://manage.windowsazure.com. ASM mode will evantually be phased out.
  • ARM (Azure Resource Manager) which is the current (new) one. This can be accessed from https://portal.azure.com

There are different capabilities between resources provisioned in each mode. This article will use Azure ARM (new) portal, API, Powershell cmdlets and capabilities.

Azure Powershell

To get started with Azure Powershell, you need to download and install the Microsoft Web Platform installer.

Microsoft Web Platform installer

Powershell version 5 which comes with Windows 10 and Server 2016 is required. Windows 8, 8.1, Server 2012 and Server 2012 R2 can have their Powershell 4 upgraded to 5. To see your Powershell version, in Powershell ISE type in $PSVersionTable

PSVersionTable

PSVersionTable

Obtaining the script

The script can be downloaded from the Microsoft Technet Gallery under Windows Azure.

Script Input

The script takes the following parameters:

  • SubscriptionName: This is the name of existing Azure subscription
  • Location: name of Azure location (data center). To see a list of Azure locations use these cmdlets:

Get-AzureRmLocation | sort Location | Select Location

Azure Locations

Azure Locations

  • ResourceGroup: Select a name for your Resource Group. A Resource Group in the ARM mode provides a logical grouping of resources and simplifies resource management.
  • StorageAccountName: This is the name of the storage account where the VM VHD disk files will be stored. The script will create it if it does not exist.  Only lower case letters and numbers are allowed.
  • AdminName: This will be the new VM local administrator
  • VMName: Name(s) of VM(s) to be created. Each has 15 characters maximum
  • VMSize: Size of Azure VM which determines its resources. To see the available VM sizes use this cmdlet:

(Get-AzureRoleSize).RoleSizeLabel

Azure VM Sizes

Azure VM Sizes

  • vNetName: This will be the name of the virtual network to be created/updated if it exists
  • vNetPrefix: To be created/updated
  • SubnetName: This will be the name of the subnet to be created/updated
  • SubnetPrefix: Must be subset of vNetPrefix above

Here’s a sample script output:

Deploy Azure ARM VM Script Output Sample

Deploy Azure ARM VM Script Output Sample

You can also view all the objects created by the script in the Azure portal:

Azure VMs created by Deploy Azure ARM VM Powershell script

Azure VMs created by Deploy Azure ARM VM Powershell script

Click on the Resource Groups icon towards the top left to open the Resource Groups blade. Click on the ‘VMGroup2’ resource group that was created by the script to open the ‘VMGroups2’ blade. Review all the objects created by the script and their properties.

Tearing down is fairly simple, and it demonstrates the power of resource groups. Simply delete the VMGroup2 resource groups, and all the objects under it are deleted automatically.

For large scale deployments, complex deployments, and advanced features and capabilities, contact Exigent Azure Consulting team.

Add a Comment

Click here to cancel reply.

Our Core Values:
  • We are always 100% committed to our customers' needs.
  • We value charity and goodwill.
  • We realize there are no shortcuts to true excellence.
  • We believe in the power of teamwork and collaboration.
  • We honor the golden rule.
  • We are humble.
  • We value transparency.
  • We are honest and value integrity.
  • We lead by example.
  • We value continuous education.
  • We value innovation and forward-thinking.
  • We foster a passion for life, work and everything in between.
  • We discourage negativity.

More About Us

Exigent Technologies LLC is a full-service information technology consulting firm that implements and maintains high-performance IT systems for small and medium-sized organizations in a wide range of industries. Regardless of their size, today’s companies rely on anytime, anywhere access to information—and Exigent delivers.
read more

Want To Find Out More?









    • IT Support & Consulting Services
    • Software Development
    • Cloud
    • About
    • Contact
    • Client Support
    • Areas Served
    • Make a Payment

    Sign Up For Updates

    IT Services, IT Consultants and Cloud Computing | New Jersey | New York City
    55 Madison Avenue, STE 400, Morristown, NJ 07960 | 845 3rd Ave FL 6, New York, NY 10022

    Copyright 2021. Exigent. All rights reserved. Sitemap Privacy Policy|WordPress Website Produced by: Inverse Paradox

    Facebook Twitter LinkedIn YouTube Glassdoor Instagram