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 providers and PSDrives


Until now, you have only seen cmdlets. Cmdlets are PowerShell commands. However, PowerShell has another import concept named providers. Providers are accessed through named drives or PSDrives. In the following sections, providers and PSDrives will be explained.

Using providers

A PowerShell provider is a piece of software that makes data stores look like filesystems. PowerShell providers are usually part of a snap-in or a module-like PowerCLI. The advantage of providers is that you can use the same cmdlets for all of the providers. These cmdlets have the following nouns: Item, ChildItem, Content, and ItemProperty. You can use the Get-Command cmdlet to get a list of all of the cmdlets with these nouns:

PowerCLI C:> Get-Command -Noun Item,ChildItem,Content,ItemProperty

CommandType Name                ModuleName
----------- ----                ----------
Cmdlet      Add-Content         Microsoft.PowerShell.Management
Cmdlet      Clear-Content       Microsoft...