Learning PowerCLI
eBook - ePub

Learning PowerCLI

  1. 374 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Learning PowerCLI

Book details
Book preview
Table of contents
Citations

About This Book

"Learning PowerCLI" is written in a friendly and practical style with a focus on getting you started and automating daily tasks quickly and efficiently. If you manage or administrate a vSphere environment, and want to make that easier and more efficient, then this book is for you! This book is ideal for you if you want to learn how to automate your VMware vSphere infrastructure, by getting the most out of PowerCLI. It's assumed that you have some experience in administrating a VMware vSphere environment. Knowledge of Microsoft's Windows PowerShell is not a prerequisite.

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Learning PowerCLI by Robert van denNieuwendijk in PDF and/or ePUB format, as well as other popular books in Computer Science & Virtualisation. We have over one million books available in our catalogue for you to explore.

Information

Year
2014
ISBN
9781782170174
Edition
1

Learning PowerCLI


Table of Contents

Learning PowerCLI
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Instant Updates on New Packt Books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Introduction to PowerCLI
Downloading and installing PowerCLI
Downloading PowerCLI
Installing PowerCLI
Modifying the PowerShell execution policy
Connecting and disconnecting servers
Connecting to a server
Connecting to multiple servers
Suppressing certificate warnings
Disconnecting from a server
Retrieving the PowerCLI configuration
Using the credential store
Retrieving a list of all of your virtual machines
Suppressing displaying deprecated warnings
Using wildcard characters
Filtering objects
Using comparison operators
Using aliases
Retrieving a list of all of your hosts
Displaying the output in a grid view
Summary
2. Learning Basic PowerCLI Concepts
Using the Get-Command, Get-Help, and Get-Member cmdlets
Using Get-Command
Using Get-VICommand
Using Get-Help
Using Get-PowerCLIHelp
Using Get-PowerCLICommunity
Using Get-Member
Using providers and PSDrives
Using providers
Using PSDrives
Using the vSphere PowerCLI Inventory Provider
Using the vSphere PowerCLI Datastore Provider
Copying files between a datastore and your PC
Using arrays and hash tables
Creating calculated properties
Using raw API objects with ExtensionData or Get-View
Using the ExtensionData property
Using the Get-View cmdlet
Using Managed Object References
Using the Get-VIObjectByVIView cmdlet
Extending PowerCLI objects with the New-VIProperty cmdlet
Working with vSphere folders
Summary
3. Working with Objects in PowerShell
Using objects, properties, and methods
Using methods
Expanding variables and subexpressions in strings
Understanding what expands a string
Expanding a string when it is used
Using here-strings
Using the pipeline
Using the ByValue parameter binding
Using the ByPropertyName parameter binding
Using the PowerShell object cmdlets
Using the Select-Object cmdlet
Using the Where-Object cmdlet
Using the ForEach-Object cmdlet
Using the Sort-Object cmdlet
Using the Measure-Object cmdlet
Rounding a value
Using the Group-Object cmdlet
Using the Compare-Object cmdlet
Using the Tee-Object cmdlet
Creating your own objects
Using the New-Object cmdlet
Using a hash table to create an object
Creating objects using the Select-Object cmdlet
Adding properties to an object with Add-Member
Using type declarations
Using COM objects
Summary
4. Managing vSphere Hosts with PowerCLI
Adding a host to a VMware vCenter Server
Creating a datacenter
Creating a cluster
Adding a host
Enabling and disabling maintenance mode
Working with host profiles
Creating a host profile
Attaching the host profile to a cluster or a host
Testing the host profile for compliance
Applying a host profile to a host or cluster
Using host profile answer files
Exporting a host profile
Importing a host profile
Working with host services
Retrieving information about host services
Starting a host service
Stopping a host service
Restarting a host service
Modifying the startup policy of a host service
Configuring the host firewall
Getting the host firewall default policy
Modifying the host firewall default policy
Getting the host firewall exceptions
Modifying a host firewall exception
Configuring vSphere Image Builder and Auto Deploy
Configuring Image Builder
Configuring Auto Deploy
Using esxcli from PowerCLI
Listing all of the available esxcli commands
Using the vSphere CLI commands from PowerCLI
Removing a host from the VMware vCenter Server
Summary
5. Managing Virtual Machines with PowerCLI
Creating a virtual machine
Creating a virtual machine from scratch
Creating a virtual machine from a template
Cloning a virtual machine
Registering a virtual machine
Using OS customization specifications
Starting and stopping a virtual machine
Starting a virtual machine
Suspending a virtual machine
Shutting down a virtual machine's guest operating system
Stopping a virtual machine
Modifying the settings of a virtual machine
Using the VMware vSphere API
Adding devices to a virtual machine
Adding a hard disk
Adding a SCSI controller
Adding a network adapter
Adding a floppy drive
Adding a CD drive
Modifying devices added to a virtual machine
Modifying a hard disk
Moving a hard disk to another datastore
Modifying a SCSI controller
Modifying a network adapter
Modifying a floppy drive
Modifying a CD drive
Removing devices from a virtual machine
Removing a hard disk
Removing a network adapter
Removing a floppy drive
Removing a CD drive
Converting a virtual machine i...

Table of contents

  1. Learning PowerCLI