23,99 €
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.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 112
Copyright © 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Vijin BorichaAcquisition Editor: Reshma RamanContent Development Editor: Roshan KumarTechnical Editor: Shweta JadhavCopy Editor: Safis EditingProject Coordinator:Namrata SwettaProofreader: Safis EditingIndexer:Priyanka DhadkeGraphics:Jason MonteiroProduction Coordinator: Nilesh Mohite
First published: December 2018
Production reference: 1191218
Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.
ISBN 978-1-78961-495-4
www.packtpub.com
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Thomas Mitchell is a 25+ year veteran of the IT industry and carries numerous industry certifications. He has built a rather in-depth skill set that spans numerous IT disciplines. Tom's disciplines include Microsoft Exchange, Microsoft Office 365, Microsoft Azure, and Active Directory. He is now an independent IT consultant, a freelance author, and online IT trainer, has written about numerous IT topics for several online publications, and has even published several of his own IT courses on Udemy (dot) com.
You can find a complete list of his courses at thomasmitchell (dot) net/udemy. Tom is the managing editor for understandingazure (dot) com. He lives with his wife, Darlene, and five kids, Michael, Tommy, Joey, Brittany, and Matthew.
Anders Eide, manager at KPMG, loves his job as it lets him make the right decisions with customers, combined with the eagerness to always be at the cutting edge of innovative technologies. This love for new technology and new ways of thinking is also one of the reasons he as been awarded as Microsoft Azure MVP since 2014.
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Title Page
Copyright and Credits
Azure PowerShell Quick Start Guide
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the color images
Conventions used
Get in touch
Reviews
Getting Started
Installing Azure PowerShell
Installing PowerShellGet
Installing the Azure PowerShell module
Loading the AzureRM module
Connecting to Azure via PowerShell
Deploying a virtual machine (VM)
Creating a resource group
Provisioning a VM with PowerShell
Connecting to a VM with RDP from PowerShell
Resizing a VM with PowerShell
Resizing a VM
VM power states
Retrieving the VM's status
Basic management tasks
The Stop VM command
The Start VM command
The Restart VM command
The Remove VM command
The Remove resource group command
Your turn
Summary
Working with Images
Working with Marketplace Images
Key PowerShell commands
Provisioning a new virtual machine from a specific image
Using custom images
Before you begin
Preparing a virtual machine
Using sysprep
Deallocating and generalizing
Creating an image
Retrieving the source VM
Creating an image configuration
Creating an image
Creating a VM from an image
Managing images
Listing images by name
Deleting an Image
Your turn
Summary
Working with Disks
Using Azure data disks
Default Azure disks
Operating system disk
Temporary disk
Temporary disk sizes
Azure data disks
Maximum data disks per VM
VM disk types
Standard disk
Premium disk
Premium disk performance
Creating and attaching disks
Creating the data disk configuration
Creating the data disk
Adding the data disk to the virtual machine
Updating the virtual machine
Preparing data disks
Manually configuring an attached disk
Your turn
Snapshotting an Azure VM disk
Setting snapshot parameters
Getting the VM
Creating the snapshot configuration
Taking the snapshot
Creating VMs from Snapshots
Loading Variables
Initializing the virtual machine configuration
Creating the virtual machine
Your turn
Encrypting virtual machine disks
An Overview of disk Encryption
Encryption process
Creating the Azure Key Vault and keys
Creating the Azure Active Directory service principal
Encrypting the virtual machine
Your turn
Clearing the Slate
Summary
High Availability
Leveraging availability sets
Availability set overview
Creating an availability set
Create a managed availability set
Creating VMs inside an availability set
Your turn
Load balancing Azure VMs
Azure load balancer overview
Creating an Azure load balancer
Creating a public IP address
Provisioning the load balancer
Frontend IP configuration
Creating a backend address pool
Creating the load balancer resource
Creating a health probe
Creating a load balancer rule
Updating the load balancer
Network resources
Preparing network resources
Getting network configuration
Getting subnet configuration
Creating virtual NICs
Creating virtual machines
Creating an availability set
Deploying virtual machines
Installing IIS on the VMs
Testing the load balancer
Adding and removing VMs
Removing a VM from the load balancer
Adding a VM to the load balancer
Your turn
Summary
Other Cool Stuff
Adding an NIC to a virtual machine
Preparing the virtual machine
Retrieving Vnet and subnet information
Creating a virtual NIC and attaching it to the subnet
Adding NICs to VMs
Tagging with PowerShell
How to tag a VM with PowerShell
Redeploying a virtual machine
Now it's your turn!
Custom Script Extensions
Custom Script Extensions – an overview
Enabling print services with CSE
Now it's your turn!
Resetting an admin password
Resetting the password
Now it's your turn!
Wrapping up
Summary
Additional learning resources
Other Books You May Enjoy
Leave a review - let other readers know what you think
The world is racing to the cloud. As such, it's critical that IT professionals stay ahead of the curve by learning about all that the cloud has to offer. Those professionals that do not will find themselves sidelined as a new breed of engineers emerges—a breed that speaks cloud proficiently. Because cloud is such a broad term, I chose to focus on Microsoft Azure in this book. More specifically, I chose to focus on how PowerShell (another little-understood technology) can be used to deploy and manage virtual machines (VM) in Microsoft Azure. By doing so, I was able to produce a book that provides current IT professionals with a roadmap, if you will, for learning PowerShell and Azure skills that many other IT professionals do not possess.
This book is for any IT professional who wants a solid guide for learning practical Azure and PowerShell skills. While this book does cover technologies that you may not be intimately familiar with, the structure of the book, coupled with the guided labs, offers an opportunity to have fun while learning.
Because the book focuses on deploying and managing Azure VMs entirely with PowerShell, numerous PowerShell commands are featured throughout the book. However, only basic knowledge of PowerShell is required to run them.
Chapter 1, Getting Started, covers the basics of Azure PowerShell and introduces you to basic PowerShell tasks, including the installation of Azure PowerShell and how to connect to Azure with it. It also covers remedial tasks, such as deploying a VM in Azure with PowerShell, resizing a VM, and managing VM states—all with PowerShell.
Chapter 2, Working with Images, introduces a few image-related Azure tasks that can be completed with PowerShell. It discusses the deployment of VMs using PowerShell with Marketplace images as well as how to create custom images and how to deploy VMs from such custom images.
Chapter 3, Working with Disks, covers more advanced topics, including the deployment and attachment of data disks using PowerShell. Also covered in this chapter is the creation of VM snapshots, and how to deploy new VMs from such snapshots. Encryption of VMs and virtual disks is also covered.
Chapter 4, High Availability, explores the deployment of availability sets and how to load balance Azure VMs.
Chapter 5, Other Cool Stuff, explores various other cool tricks that you can do with Azure PowerShell. Covered in this chapter is the creation and attachment of NICs to VMs using PowerShell. Tagging VMs with PowerShell and redeploying VMs with PowerShell are also covered, as are admin password resets. However, the coolest topic covered in this chapter is the management of VMs with custom script extensions.
This book is intended for IT professionals who are responsible for managing Azure VMs. No prior PowerShell or Azure experience is needed.
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/9781789614954_ColorImages.pdf.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].
Errata