Book Image

Azure PowerShell Quick Start Guide

By : Thomas Mitchell
Book Image

Azure PowerShell Quick Start Guide

By: Thomas Mitchell

Overview of this book

As an IT professional, it is important to keep up with cloud technologies and learn to manage those technologies. PowerShell is a critical tool that must be learned in order to effectively and more easily manage many Azure resources. This book is designed to teach you to leverage PowerShell to enable you to perform many day-to-day tasks in Microsoft Azure. Taking you through the basic tasks of installing Azure PowerShell and connecting to Azure, you will learn to properly connect to an Azure tenant with PowerShell. Next, you will dive into tasks such as deploying virtual machines with PowerShell, resizing them, and managing their power states with PowerShell. Then, you will learn how to complete more complex Azure tasks with PowerShell, such as deploying virtual machines from custom images, creating images from existing virtual machines, and creating and managing of data disks. Later, you will learn how to snapshot virtual machines, how to encrypt virtual machines, and how to leverage load balancers to ensure high availability with PowerShell. By the end of this book, you will have developed dozens of PowerShell skills that are invaluable in the deployment and management of Azure virtual machines.
Table of Contents (7 chapters)

Working with Marketplace Images

Although a virtual machine can be deployed in Azure with default options, the Azure marketplace offers numerous virtual machine images that can be used to create a new virtual machine.

If you are following along, you previously deployed a virtual machine, called MyVM, using the default Windows Server 2016-Datacenter image (because you didn't choose a specific image to use). However, here, I'm going to explain how to use PowerShell to search the marketplace for other Windows images and how to deploy a new virtual machine in Azure using one of those images.

Before performing any exercises in this section, run the following command to recreate the VMLab resource group if you've deleted it:

New-AzureRmResourceGroup -ResourceGroupName "VMLab" -Location "EastUS"

The preceding command should generate the output you see...