Part I: PowerShell for Exchange Fundamentals
42
Using the previous example, the following command uses the relative path notation backslash character
to change the current location to the root of drive C:\ :
[PS] C:\Documents and Settings\exadmin> cd \
Notice in this example the prompt is updated to show the current location after the command completes.
Also notice the space used between the cd alias and the backslash character ( \ ). Because of the way Windows
PowerShell parses commands, there must be a space between a cmdlet or alias name and parameter values
passed to the command as input. This is different from the way cd behaves when used in cmd.exe .
Other relative path notations recognized by Windows PowerShell include a single period ( . ) to represent
the current location, and double periods ( .. ) to represent the parent of the current location.
The following table describes the most common command names and the corresponding cmdlets you ??™ ll
find useful for navigating locations and controlling items from the command line.
Common Command
Windows PowerShell
Command ( & Alias) Description
CD
CHDIR
Set-Location (sl) Sets the current working location to a
specified location.
PWD Get-Location (gl) Gets the current location.
POPD Pop-Location Restores the previous value of the
location saved by Push-Location .
Pages:
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86