Book Image

Learning PowerCLI for VMware VSphere

By : Robert van den Nieuwendijk
Book Image

Learning PowerCLI for VMware VSphere

By: Robert van den Nieuwendijk

Overview of this book

Table of Contents (17 chapters)
Learning PowerCLI
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using the PowerShell object cmdlets


PowerShell has some cmdlets that are designed to work with all kinds of objects. You can easily recognize them because they all have -Noun Object. You can use the Get-Command cmdlet's –Noun parameter to find them:

PowerCLI C:\> Get-Command -Noun Object

The output of the preceding command is as follows:

CommandType Name           ModuleName
----------- ----           ----------
Cmdlet      Compare-Object Microsoft.PowerShell.Utility
Cmdlet      ForEach-Object Microsoft.PowerShell.Core
Cmdlet      Group-Object   Microsoft.PowerShell.Utility
Cmdlet      Measure-Object Microsoft.PowerShell.Utility
Cmdlet      New-Object     Microsoft.PowerShell.Utility
Cmdlet      Select-Object  Microsoft.PowerShell.Utility
Cmdlet      Sort-Object    Microsoft.PowerShell.Utility
Cmdlet      Tee-Object     Microsoft.PowerShell.Utility
Cmdlet      Where-Object   Microsoft.PowerShell.Core

In the following section, we will discuss the Object cmdlets.

Using the Select-Object...