PowerCLI Cookbook

Over 75 step-by-step recipes to put PowerCLI into action for efficient administration of your virtual environment
Preview in Mapt

PowerCLI Cookbook

Philip Sellers

1 customer reviews
Over 75 step-by-step recipes to put PowerCLI into action for efficient administration of your virtual environment
Mapt Subscription
FREE
$29.99/m after trial
eBook
$28.00
RRP $39.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$28.00
$49.99
$29.99 p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


PowerCLI Cookbook Book Cover
PowerCLI Cookbook
$ 39.99
$ 28.00
Mastering PowerCLI Book Cover
Mastering PowerCLI
$ 43.99
$ 30.80
Buy 2 for $35.00
Save $48.98
Add to Cart

Book Details

ISBN 139781784393724
Paperback274 pages

Book Description

PowerCLI allows faster administration by executing tasks on groups of objects in the virtual environment and is flexible enough to allow complex, scripted routines to solve complex problems.

PowerCLI Cookbook illustrates the ease of performing repetitive tasks using native PowerCLI commands to speed up administration. This book teaches you how to create custom functions and modules to solve specific problems and deploy these solutions to operators. It covers all vSphere administration areas including host, cluster, and virtual machine management utilizing PowerCLI.

Finally, this book will enable administrators to execute scripts that will open new possibilities for automation and also enable them to manage VM workloads effectively.

Table of Contents

Chapter 1: Configuring the Basic Settings of an ESXi Host with PowerCLI
Introduction
Connecting to an ESXi host or a vCenter instance
Getting the VMware host object
Joining an ESXi host into Active Directory
Enabling services and setting security profiles
Setting network configuration
Creating datastores on an ESXi host
Configuring syslog settings on an ESXi host
Joining an ESXi host to vCenter
Creating a configuration script to set all properties uniformly
Chapter 2: Configuring vCenter and Computing Clusters
Introduction
Creating a virtual datacenter in vCenter
Creating a cluster and adding ESXi hosts
Setting cluster advanced features, including HA, DRS, and EVC
Setting up resource pools
Setting up folders to organize objects in vCenter
Setting permissions on vCenter objects
Chapter 3: Managing Virtual Machines
Introduction
Deploying the first virtual machine
Cloning a virtual machine to a template
Deploying new virtual machines from a template
Importing a virtual appliance from OVA
Performing a hot add of virtual hardware to an existing virtual machine
Enabling and disabling Fault Tolerance on a virtual machine
Increasing the disk space in a virtual machine
Upgrading the virtual hardware version of a virtual machine
Locating and reloading inaccessible or invalid virtual machines
Setting VMware Tool settings from PowerCLI
Creating basic reports of VM properties using VMware Tools and PowerCLI
Chapter 4: Working with Datastores and Datastore Clusters
Introduction
Performing Storage vMotion
Finding Raw Disk Mappings in your environment
Locating thin or thick provisioned disks
Converting thin to thick disks with Storage vMotion
Creating and managing datastore clusters
Setting Storage DRS automation levels for individual virtual machines
Setting Storage DRS automation levels for individual VMs using PowerCLI 6
Chapter 5: Creating and Managing Snapshots
Introduction
Creating a snapshot
Getting a list of snapshots in the environment
Manipulating the list of snapshots to get better information
Scoping and filtering a list of snapshots
Removing targeted snapshots
Find lost or unknown snapshots
Creating a function to automatically remediate snapshots
Scheduling automatic snapshot remediation
Creating a snapshot management module
Chapter 6: Managing Resource Pools, Reservations, and Limits for Virtual Machines
Introduction
Setting reservations and limits for resource pools
Balancing share allocations on resource pools
Creating a custom attribute with a number of shares per VM on each resource pool
Automating share allocation balancing
Reporting shares, reservations, and limits of resource pools and virtual machines
Chapter 7: Creating Custom Reports and Notifications for vSphere
Introduction
Getting alerts from a vSphere environment
Basics of formatting output from PowerShell objects
Sending output to CSV and HTML
Reporting VM objects created during a predefined time period from VI Events object
Setting custom properties to add useful context to your virtual machines
Using PowerShell native capabilities to schedule scripts
Chapter 8: Performing ESXCLI and in-guest Commands from PowerCLI
Introduction
Retrieving the ESXCLI object in PowerCLI
Using the ESXCLI vm namespace to kill a misbehaving VM
Performing ESXi ping with an ESXCLI object
Configuring custom storage and path selection policies
Configuring coredump settings for an ESXi host from PowerCLI
Executing native commands inside the guest operating system from PowerCLI
Chapter 9: Managing DRS and Affinity Groups using PowerCLI
Introduction
Applying recommendations for partially automated DRS clusters
Setting a cluster into maintenance mode with PowerCLI
Using native DRS rule cmdlets to manage KeepTogether and Separate rules
Learning the MoRef way of identifying objects
Creating a DRS group for virtual machines
Listing the members of a DRS group
Updating the members of a VM DRS group
Creating a custom function to update members of a DRS group
Creating rules to maintain memberships of DRS groups using a custom function
Using Compare-Object to audit group memberships for differences
Chapter 10: Working with vCloud Director from PowerCLI
Introduction
Connecting to a vCloud environment
Creating and managing organizations in vCloud
Creating a new user in an organization using Views
Creating an organization's virtual datacenter in vCloud Director
Importing a vApp template into vCloud
Configuring networking in a vCloud vApp
Reassigning vApp VM network settings with PowerCLI
Starting and stopping vApps and individual VMs in a vCloud

What You Will Learn

  • Configure and administer VMware ESXi hosts, clusters, and vCenter
  • Manage virtual machine configurations and operations
  • Administer datastores, datastore clusters, and virtual machine snapshots
  • Create and configure virtual networking in a vSphere environment
  • Manage cluster features and affinity groups
  • Make custom reports and notifications from vSphere
  • Direct operations in vCloud Director

Authors

Table of Contents

Chapter 1: Configuring the Basic Settings of an ESXi Host with PowerCLI
Introduction
Connecting to an ESXi host or a vCenter instance
Getting the VMware host object
Joining an ESXi host into Active Directory
Enabling services and setting security profiles
Setting network configuration
Creating datastores on an ESXi host
Configuring syslog settings on an ESXi host
Joining an ESXi host to vCenter
Creating a configuration script to set all properties uniformly
Chapter 2: Configuring vCenter and Computing Clusters
Introduction
Creating a virtual datacenter in vCenter
Creating a cluster and adding ESXi hosts
Setting cluster advanced features, including HA, DRS, and EVC
Setting up resource pools
Setting up folders to organize objects in vCenter
Setting permissions on vCenter objects
Chapter 3: Managing Virtual Machines
Introduction
Deploying the first virtual machine
Cloning a virtual machine to a template
Deploying new virtual machines from a template
Importing a virtual appliance from OVA
Performing a hot add of virtual hardware to an existing virtual machine
Enabling and disabling Fault Tolerance on a virtual machine
Increasing the disk space in a virtual machine
Upgrading the virtual hardware version of a virtual machine
Locating and reloading inaccessible or invalid virtual machines
Setting VMware Tool settings from PowerCLI
Creating basic reports of VM properties using VMware Tools and PowerCLI
Chapter 4: Working with Datastores and Datastore Clusters
Introduction
Performing Storage vMotion
Finding Raw Disk Mappings in your environment
Locating thin or thick provisioned disks
Converting thin to thick disks with Storage vMotion
Creating and managing datastore clusters
Setting Storage DRS automation levels for individual virtual machines
Setting Storage DRS automation levels for individual VMs using PowerCLI 6
Chapter 5: Creating and Managing Snapshots
Introduction
Creating a snapshot
Getting a list of snapshots in the environment
Manipulating the list of snapshots to get better information
Scoping and filtering a list of snapshots
Removing targeted snapshots
Find lost or unknown snapshots
Creating a function to automatically remediate snapshots
Scheduling automatic snapshot remediation
Creating a snapshot management module
Chapter 6: Managing Resource Pools, Reservations, and Limits for Virtual Machines
Introduction
Setting reservations and limits for resource pools
Balancing share allocations on resource pools
Creating a custom attribute with a number of shares per VM on each resource pool
Automating share allocation balancing
Reporting shares, reservations, and limits of resource pools and virtual machines
Chapter 7: Creating Custom Reports and Notifications for vSphere
Introduction
Getting alerts from a vSphere environment
Basics of formatting output from PowerShell objects
Sending output to CSV and HTML
Reporting VM objects created during a predefined time period from VI Events object
Setting custom properties to add useful context to your virtual machines
Using PowerShell native capabilities to schedule scripts
Chapter 8: Performing ESXCLI and in-guest Commands from PowerCLI
Introduction
Retrieving the ESXCLI object in PowerCLI
Using the ESXCLI vm namespace to kill a misbehaving VM
Performing ESXi ping with an ESXCLI object
Configuring custom storage and path selection policies
Configuring coredump settings for an ESXi host from PowerCLI
Executing native commands inside the guest operating system from PowerCLI
Chapter 9: Managing DRS and Affinity Groups using PowerCLI
Introduction
Applying recommendations for partially automated DRS clusters
Setting a cluster into maintenance mode with PowerCLI
Using native DRS rule cmdlets to manage KeepTogether and Separate rules
Learning the MoRef way of identifying objects
Creating a DRS group for virtual machines
Listing the members of a DRS group
Updating the members of a VM DRS group
Creating a custom function to update members of a DRS group
Creating rules to maintain memberships of DRS groups using a custom function
Using Compare-Object to audit group memberships for differences
Chapter 10: Working with vCloud Director from PowerCLI
Introduction
Connecting to a vCloud environment
Creating and managing organizations in vCloud
Creating a new user in an organization using Views
Creating an organization's virtual datacenter in vCloud Director
Importing a vApp template into vCloud
Configuring networking in a vCloud vApp
Reassigning vApp VM network settings with PowerCLI
Starting and stopping vApps and individual VMs in a vCloud

Book Details

ISBN 139781784393724
Paperback274 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mastering PowerCLI Book Cover
Mastering PowerCLI
$ 43.99
$ 30.80
Learning PowerCLI - Second Edition Book Cover
Learning PowerCLI - Second Edition
$ 39.99
$ 28.00
Learning VMware vRealize Automation Book Cover
Learning VMware vRealize Automation
$ 35.99
$ 25.20
PowerCLI Essentials Book Cover
PowerCLI Essentials
$ 31.99
$ 22.40
Learning VMware NSX Book Cover
Learning VMware NSX
$ 31.99
$ 22.40
VMware vRealize Configuration Manager Cookbook Book Cover
VMware vRealize Configuration Manager Cookbook
$ 39.99
$ 28.00