Information Technology Reference
In-Depth Information
and hardware. In this section we'll briel y cover some core concepts about PowerShell that will
help you get started with PowerCLI.
PowerShell v New Features
PowerShell v3 comes with many new enhancements that can be extremely advantageous when
managing vSphere with PowerCLI 5.5. Here are a few:
Workfl ows and more robust sessions mean long or complex operations are less likely to fail.
Improved cmdlet discovery and automatic module loading are especially useful when adding
community resources.
h e Show-Command cmdlet provides a visual dialog box, allowing users to identify a cmdlet's
parameters.
Cmdlets
The i rst PowerShell term that needs dei ning is cmdlets (pronounced “command-lets”), which
are compiled .NET classes that perform a single action on an object. Their format is <verb>
-<singular noun>. For the most part cmdlets are simple to use because they don't attempt to do
too much at once. Also, because there is an established naming convention, often you can i nd
the cmdlet you need by simply guessing. For instance, to get all the VMs in vCenter, you run
Get-VM—intuitive by design.
Objects
PowerShell is built on the Microsoft .NET Framework, and as such, objects are a critical compo-
nent to understand in order to be successful with PowerCLI. Put simply, an object is a container
of properties and methods. When you execute the PowerCLI cmdlet Get-VM while connected
to a Virtual Center server, the information that is returned is a collection of virtual machine
objects. Each VM can be treated as its own object that contains unique information for that VM.
The information for VM A and VM B will be different, but they will be the same type of object,
or container. This means that you can i lter or compare properties of each object because they
share the same format. To do this, it helps to understand what properties are available. You can
do this a variety of ways. We'll show you how to quickly get general and detailed information
from an object.
About This Section
h e information in this section will be more meaningful once you have installed PowerCLI and
connected to your virtual environment. We recommend returning to this section at that time and
trying out the steps listed next.
Search WWH ::




Custom Search