
Chapter 1: Getting Started with Windows PowerShell
23
Using this procedure you can enter complex, mistake - free cmdlet names using a minimal number of
characters and Tab keystrokes. One major benefit of tab expansion is you don ’ t have to remember exact
cmdlet names as long as you can enter at least the verb name followed by a few letters of the noun name.
Tab expansion works for parameter names in the same manner. This works especially well when you
don ’ t know all the possible parameter names a cmdlet is using. To cycle through all the parameter names
type a hyphen and press the Tab key repeatedly. When the correct parameter name appears, continue
typing to enter the parameter value as applicable.
Be careful when using this procedure because Windows PowerShell does not validate the parameter
names entered on the command line until the command is parsed at run time. Using tab expansion it is
possible to inadvertently enter the same parameter name twice, causing the command to fail.
Using Cmdlet Aliases
Windows PowerShell allows you to refer to cmdlets using a shorter, simpler name called an alias. The
default installation of Windows PowerShell comes complete with several predefined alias names that
approximate a similar function in other command shells.
You may have already noticed that Windows PowerShell accepts
dir as a command to display items in
the current location. ...