Book description
Learn to leverage the power of PowerCLI to automate your VMware vSphere environment with ease
About This Book
This is first book on the market that will enlighten you on the latest version of PowerCLI and how to implement it
Effectively manage virtual machines, networks, and reports with the latest features of PowerCLI
A comprehensive and practical book on automating VMware vSphere
Who This Book Is For
This book is ideal for you if you want to learn how to automate your VMware vSphere or vCloud infrastructure by getting the most out of PowerCLI. It's assumed that you have some experience in administrating a vSphere or vCloud environment. Knowledge of Microsoft's Windows PowerShell is not a prerequisite.
What You Will Learn
Explore PowerShell and PowerCLI cmdlets and their output objects
See how to manage virtual machines and work with virtual networks
Manage vCloud Director from PowerCLI
Use Site Recovery Manager from PowerCLI to create a disaster recovery solution
Manage NSX and vRealize Automation using REST API with PowerCLI
Create and configure vSphere HA and DRS clusters
Use vSphere Update Manager with PowerCLI to create patch baselines and scan hosts
Explore reporting techniques to retrieve log files
In Detail
VMware vSphere PowerCLI, a free extension to Microsoft Windows PowerShell, enables you to automate the management of a VMware vSphere or vCloud environment.
This book will show you how to automate your tasks and make your job easier. Starting with an introduction to the basics of PowerCLI, the book will teach you how to manage your vSphere and vCloud infrastructure from the command line. To help you manage a vSphere host overall, you will learn how to manage vSphere ESXi hosts, host profiles, host services, host firewall, and deploy and upgrade ESXi hosts using Image Builder and Auto Deploy. The next chapter will not only teach you how to create datastore and datastore clusters, but you'll also work with profile-driven and policy-based storage to manage your storage. To create a disaster recovery solution and retrieve information from vRealize Operations, you will learn how to use Site Recovery Manager and vRealize Operations respectively. Towards the end, you'll see how to use the REST APIs from PowerShell to manage NSX and vRealize Automation and create patch baselines, scan hosts against the baselines for missing patches, and re-mediate hosts.
By the end of the book, you will be capable of using the best tool to automate the management and configuration of VMware vSphere.
Style and approach
This comprehensive book will teach system administrators everything about PowerCLI 6 and how to utilize it to automate VMware vSphere.
Table of contents
-
Learning PowerCLI Second Edition
- Learning PowerCLI Second Edition
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Preface
-
1. Introduction to PowerCLI
- Downloading and installing PowerCLI
- Participating in the VMware Customer Improvement Program
- Modifying the PowerShell execution policy
- Creating a PowerShell profile
- Connecting and disconnecting servers
- Using the credential store
- Retrieving a list of all of your virtual machines
- Retrieving a list of all of your hosts
- Summary
- 2. Learning Basic PowerCLI Concepts
- 3. Working with Objects in PowerShell
-
4. Managing vSphere Hosts with PowerCLI
- Adding hosts to a VMware vCenter Server
- Enabling and disabling maintenance mode
- Working with host profiles
- Working with host services
- Configuring the host firewall
-
Using vSphere Image Builder and Auto Deploy
-
Using Image Builder
- Adding ESXi software depots to your PowerCLI session
- Retrieving the ESXi software depots added to your PowerCLI session
- Retrieving the image profiles in your PowerCLI session
- Creating image profiles
- Retrieving VIB objects from all of the connected depots
- Adding VIBs to an image profile or updating existing VIBs
- Exporting an image profile to an ISO or ZIP file
- Configuring Auto Deploy
-
Using Image Builder
- Using esxcli from PowerCLI
- Removing hosts from a VMware vCenter Server
- Summary
-
5. Managing Virtual Machines with PowerCLI
- Creating virtual machines
- Registering virtual machines
- Using OS customization specifications
- Importing OVF or OVA packages
- Starting and stopping virtual machines
- Modifying the settings of virtual machines
- Converting virtual machines into templates
- Moving virtual machines to another folder, host, cluster, resource pool, or datastore
- Updating VMware Tools
- Upgrading virtual machine compatibility
- Using snapshots
- Running commands in the guest OS
- Configuring Fault Tolerance
- Opening the console of virtual machines
- Removing virtual machines
- Using tags
- Summary
-
6. Managing Virtual Networks with PowerCLI
- Using vSphere Standard Switches
- Using host network adapters
- Using standard port groups
-
Using vSphere Distributed Switches
- Creating vSphere Distributed Switches
- Retrieving vSphere Distributed Switches
- Configuring vSphere Distributed Switches
- Adding hosts to vSphere Distributed Switches
- Retrieving hosts connected to vSphere Distributed Switches
- Adding host physical network adapters to a vSphere Distributed Switch
- Removing host physical network adapters from a vSphere Distributed Switch
- Removing hosts from a vSphere Distributed Switch
- Exporting the configuration of vSphere Distributed Switches
- Removing vSphere Distributed Switches
-
Using distributed virtual port groups
- Creating distributed virtual port groups
- Retrieving distributed virtual port groups
- Modifying distributed virtual port groups
- Configuring network I/O control
- Exporting the configuration of distributed virtual port groups
- Migrating a host network adapter from a standard port group to a distributed port group
- Removing distributed virtual port groups
- Configuring host networking
- Configuring the network of virtual machines
- Summary
-
7. Managing Storage
- Rescanning for new storage devices
- Creating datastores
- Retrieving datastores
- Setting the multipathing policy
- Configuring vmhba paths to an SCSI device
- Working with Raw Device Mappings
- Configuring storage I/O control
- Configuring Storage DRS
- Upgrading datastores to VMFS-5
- Removing datastores
-
Using VMware vSAN
- Configuring VMware vSAN networking
- Enabling VMware vSAN on vSphere clusters
- Retrieving the devices available for VMware vSAN
- Creating VMware vSAN disk groups
- Retrieving VMware vSAN disk groups
- Adding a host SCSI disk to a VMware vSAN disk group
- Retrieving the host disks that belong to a VMware vSAN disk group
- Removing disks from a VMware vSAN disk group
- Removing VMware vSAN disk groups
-
Using vSphere storage policy-based management
- Retrieving storage capabilities
- Using tags to define storage capabilities
- Creating SPBM rules
- Creating SPBM rule sets
- Creating SPBM storage policies
- Retrieving SPBM storage policies
- Modifying SPBM storage policies
- Retrieving SPBM compatible storage
- Using SPBM to create virtual machines
- Retrieving SPBM-related configuration data of clusters, virtual machines, and hard disks
- Associating storage policies with virtual machines and hard disks and enabling SPBM on clusters
- Exporting SPBM storage policies
- Importing SPBM storage policies
- Removing SPBM storage policies
- Summary
-
8. Managing High Availability and Clustering
- Creating vSphere HA and DRS clusters
- Retrieving clusters
- Modifying the cluster settings
- Moving hosts to clusters
- Moving clusters
- Using DRS rules
- Using DRS recommendations
- Using resource pools
- Using Distributed Power Management
- Removing clusters
- Summary
-
9. Managing vCenter Server
- Working with roles and permissions
-
Managing licenses
- Adding license keys to the license inventory
- Retrieving license keys from the license inventory
- Removing license keys from the license inventory
- Assigning licenses to hosts
- Retrieving assigned licenses
- Using the LicenseDataManager
- Configuring alarms
- Retrieving events
- Summary
-
10. Patching ESXi Hosts and Upgrading Virtual Machines
- Downloading new patches into the Update Manager repository
- Retrieving patches in the Update Manager repository
- Using baselines and baseline groups
- Testing inventory objects for compliance with baselines
- Retrieving baseline compliance data
- Initializing staging of patches
- Remediating inventory objects
- Summary
-
11. Managing VMware vCloud Director and vCloud Air
- Connecting to vCloud Air servers and vCloud Director servers
- Retrieving organizations
- Retrieving organization virtual datacenters
- Retrieving organization networks
- Retrieving vCloud users
- Using vCloud virtual appliances
- Managing vCloud virtual machines
- Using the vCloud Director API with Get-CIView
- Disconnecting from vCloud Director servers
- Summary
-
12. Using Site Recovery Manager
- Installing SRM
- Connecting to SRM servers
- Downloading and installing the Meadowcroft.SRM module
- Pairing SRM sites
- Retrieving the SRM user info
- Managing protection groups
- Protecting virtual machines
- Retrieving protected virtual machines
- Unprotecting virtual machines
- Managing recovery plans
- Disconnecting from SRM servers
- Summary
-
13. Using vRealize Operations Manager
- Connecting to vRealize Operations Manager servers
- Retrieving vRealize Operations Manager resource objects
- Using alerts
- Retrieving recommendations
- Retrieving statistic keys
- Retrieving statistical data
- Retrieving local user accounts
- Using the vRealize Operations Manager API
- Disconnecting from vRealize Operations Manager servers
- Summary
- 14. Using REST API to manage NSX and vRealize Automation
- 15. Reporting with PowerCLI
Product information
- Title: Learning PowerCLI - Second Edition
- Author(s):
- Release date: February 2017
- Publisher(s): Packt Publishing
- ISBN: 9781786468017
You might also like
book
Learning PowerCLI
Automate your Vmware vSphere environment by learning how to install and use PowerCLI. This book takes …
book
클라우드 네이티브를 위한 데이터 센터 네트워크 구축: 데이터 센터 네트워킹을 위한 아키텍처, 프로토콜, 도구
이 책은 모던 클라우드 네이티브 데이터 센터 네트워크에 대해 학습하고 구축 및 검증하는 방법을 다룬다. 클라우드 …
book
bash를 활용한 사이버 보안 운영
이 책은 사이버 보안 운영자를 위한 실무 지침서다. 리눅스 명령과 bash 셸을 활용해 자료 수집, 로그 …
book
PowerCLI Essentials
Simplify and automate server administration tasks with PowerCLI About This Book Automate VMware’s VSphere environment by …