Prev | Current Page 47 | Next

Joezer Cookey-Gam, Brendan Keane, Jeffrey Rosen, and Jonathan Runyon

"Professional Windows PowerShell for Exchange Server 2007 Service Pack 1"


You may have already noticed that Windows PowerShell accepts dir as a command to display items in
the current location. There is no real cmdlet called dir , instead it is an alias for the underlying Windows
PowerShell cmdlet Get-ChildItem . Several other familiar command names have been defined as alias
names for the matching Windows PowerShell command. To see a list of all alias definitions, run
Get-Alias .
Windows PowerShell also allows you to define your own alias definitions using the New-Alias cmdlet.
The lifetime of alias definitions is linked to the lifetime of the current shell session. When the shell closes
the definition is lost. To learn more about aliases, type Get-Help about_Alias .
Using Pipelines
As mentioned earlier in this chapter, the results of running a Windows PowerShell cmdlet is a collection
of one or more .NET objects. These objects have a structure that describes the properties (attributes) of
the objects and the states (current value) of these properties. This feature of Windows PowerShell makes
it possible to take the results of one cmdlet and pass it via pipeline as input to another cmdlet for further
processing. Using a pipeline to pass data from one cmdlet to another is known as composition .
The vertical pipeline operator (|) is used to instruct Windows PowerShell to pass the collected objects
from the command just prior to the pipeline to the next command.


Pages:
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Poker Porady noclegi w górach spa nad morzem freeroll titan poker wentylacja