O'Reilly logo

Microsoft® Windows PowerShell™ Step By Step by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the Variable Provider

The variable provider provides access to the variables that are defined within WindowsPowerShell. These variables include both user-defined variables, such as $mred, and system-defined variables, such as $host. You can obtain a listing of the cmdlets designed to work specifically with variables by using the Get-Help cmdlet and specifying the asterisk (*) variable. The commands used in the procedure are in the UnderstandingTheVariableProvider.txt and WorkingWithVariables.txt files. To return only cmdlets, we use the Where-Object cmdlet and filter on the category that is equal to cmdlet. This command is shown here:

Get-Help *variable | Where-Object {$_.category -eq "ÒcmdletÓ"}

The resulting list contains five cmdlets ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required