Information Technology Reference
In-Depth Information
Alternatively, you could check all of your clusters for hosts in maintenance mode. Doing so
means that you pass a collection of all Cluster objects in inventory through the pipeline and
then gather the VMhosts that are in maintenance mode:
Get-Cluster | Get-VMhost | Where{$_.ConnectionState -eq “Maintenance”}
Note that the Where-Object cmdlet, using the alias Where, is collecting the VMhost objects
to check for the ConnectionState property value. This is just a touch of what the pipeline can
really provide as you pass objects through. You will see many more examples of the pipeline
throughout this chapter, and hopefully the concepts of objects and the pipeline will become sec-
ond nature to you.
What's New in PowerCLI 5.5
Each version of PowerCLI has included new cmdlets to take advantage of the many new fea-
tures provided in vSphere. PowerCLI 5.5 provides improvements to existing cmdlets, support
for Windows PowerShell 3.0, and the long-awaited Virtual Distributed Switch (VDS) snap-in.
The VDS snap-in now provides native capabilities for automating and managing distributed
switches and distributed port groups. This gives vSphere administrators the ability to script
tasks like adding or removing hosts from a distributed virtual switch, migrating virtual net-
work adapters from standard to distributed port groups, and even import, clone, or roll back the
coni guration of a distributed virtual switch or distributed port group. We recommend taking
some time to review the PowerCLI 5.5 release notes for a full breakdown of the new capabilities,
improvements of previous cmdlets, and known issues.
Installing and Confi guring PowerCLI
To install PowerCLI 5.5, you must have Microsoft Windows PowerShell v2.0 or v3 as well as
.NET Framework 2.0SP2, 3.0, or 3.5 (Figure 14.2). We recommend that you go ahead and upgrade
PowerShell to version 3, given that it is now supported with PowerCLI 5.5 and includes several
valuable new features, as mentioned previously. At the time of this writing, PowerShell v4 has
been announced, but no announcement of PowerCLI support of PowerShell v4 has been made.
Figure 14.2
PowerShell 2
required
Installing PowerCLI actually means installing two different components:
PowerShell is a core component of Windows since Windows 7, but if you're running an
older version of Windows, you'll need to install the Windows Management Framework,
available for download from Microsoft's website at www.microsoft.com/download.
 
Search WWH ::




Custom Search