Azure PowerShell Quick Start Guide

Book Description

Leverage PowerShell to perform many day-to-day tasks in Microsoft Azure

Key Features

  • Deploy and manage Azure virtual machines with PowerShell commands.
  • Get to grips with core concept of Azure PowerShell such as working with images and disks, custom script extension, high availability and more.
  • Leverage hands-on projects to successfully apply what you learned through the course of this book.

Book Description

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.

What you will learn

  • Manage virtual machines with PowerShell
  • Resize a virtual machine with PowerShell
  • Create OS disk snapshots via PowerShell
  • Deploy new virtual machines from snapshots via PowerShell
  • Provision and attach data disks to a virtual machine via PowerShell
  • Load balance virtual machines with PowerShell
  • Manage virtual machines with custom script extensions

Who this book is for

This book is intended for IT professionals who are responsible for managing Azure virtual machines. No prior PowerShell or Azure experience is needed.

Publisher Resources

View/Submit Errata

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Azure PowerShell Quick Start Guide
  3. About Packt
    1. Why subscribe?
    2. Packt.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the color images
      2. Conventions used
    4. Get in touch
      1. Reviews
  6. Getting Started
    1. Installing Azure PowerShell
      1. Installing PowerShellGet
      2. Installing the Azure PowerShell module
      3. Loading the AzureRM module
      4. Connecting to Azure via PowerShell
    2. Deploying a virtual machine (VM)
      1. Creating a resource group
      2. Provisioning a VM with PowerShell
      3. Connecting to a VM with RDP from PowerShell
    3. Resizing a VM with PowerShell
      1. Resizing a VM
    4. VM power states
      1. Retrieving the VM's status
    5. Basic management tasks
      1. The Stop VM command
      2. The Start VM command
      3. The Restart VM command
      4. The Remove VM command
      5. The Remove resource group command
      6. Your turn
    6. Summary 
  7. Working with Images
    1. Working with Marketplace Images
      1. Key PowerShell commands
      2. Provisioning a new virtual machine from a specific image
    2. Using custom images
      1. Before you begin
      2. Preparing a virtual machine
        1. Using sysprep
        2. Deallocating and generalizing
      3. Creating an image
        1. Retrieving the source VM
        2. Creating an image configuration
        3. Creating an image
      4. Creating a VM from an image
      5. Managing images
        1. Listing images by name
        2. Deleting an Image
      6. Your turn
    3. Summary 
  8. Working with Disks
    1. Using Azure data disks
      1. Default Azure disks
        1. Operating system disk
        2. Temporary disk
          1. Temporary disk sizes
      2. Azure data disks
        1. Maximum data disks per VM
      3. VM disk types
        1. Standard disk
        2. Premium disk
          1. Premium disk performance
      4. Creating and attaching disks
        1. Creating the data disk configuration
        2. Creating the data disk
        3. Adding the data disk to the virtual machine
        4. Updating the virtual machine
      5. Preparing data disks
        1. Manually configuring an attached disk
      6. Your turn
    2. Snapshotting an Azure VM disk
      1. Setting snapshot parameters
      2. Getting the VM
      3. Creating the snapshot configuration
      4. Taking the snapshot
    3. Creating VMs from Snapshots
      1. Loading Variables
      2. Initializing the virtual machine configuration
      3. Creating the virtual machine
      4. Your turn
    4. Encrypting virtual machine disks
      1. An Overview of disk Encryption
      2. Encryption process
        1. Creating the Azure Key Vault and keys
        2. Creating the Azure Active Directory service principal
        3. Encrypting the virtual machine
      3. Your turn
    5. Clearing the Slate
    6. Summary
  9. High Availability
    1. Leveraging availability sets
      1. Availability set overview
      2. Creating an availability set
        1. Create a managed availability set
      3. Creating VMs inside an availability set
      4. Your turn
    2. Load balancing Azure VMs
      1. Azure load balancer overview
      2. Creating an Azure load balancer
        1. Creating a public IP address
        2. Provisioning the load balancer
          1. Frontend IP configuration
          2. Creating a backend address pool
          3. Creating the load balancer resource
        3. Creating a health probe
        4. Creating a load balancer rule
        5. Updating the load balancer
      3. Network resources
        1. Preparing network resources
          1. Getting network configuration
          2. Getting subnet configuration
          3. Creating virtual NICs
      4. Creating virtual machines
        1. Creating an availability set
        2. Deploying virtual machines
        3. Installing IIS on the VMs
      5. Testing the load balancer
      6. Adding and removing VMs
        1. Removing a VM from the load balancer
        2. Adding a VM to the load balancer
      7. Your turn
    3. Summary 
  10. Other Cool Stuff
    1. Adding an NIC to a virtual machine
      1. Preparing the virtual machine
      2. Retrieving Vnet and subnet information
      3. Creating a virtual NIC and attaching it to the subnet
      4. Adding NICs to VMs
    2. Tagging with PowerShell
      1. How to tag a VM with PowerShell
    3. Redeploying a virtual machine
      1. Now it's your turn!
    4. Custom Script Extensions
      1. Custom Script Extensions – an overview
      2. Enabling print services with CSE
      3. Now it's your turn!
    5. Resetting an admin password
      1. Resetting the password
      2. Now it's your turn!
    6. Wrapping up
    7. Summary
    8. Additional learning resources
  11. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product Information

  • Title: Azure PowerShell Quick Start Guide
  • Author(s): Thomas Mitchell
  • Release date: December 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789614954