PUSHD Push-Location Saves the current location then changes
to the specified location.
DIR
LS
Get-ChildItem (gc) Gets the items and child items in a
specified location.
CLS
CLEAR
Clear-Host Clears the console screen. *
DEL
ERASE
RD
RMDIR
RM
Remove-Item (ri) Deletes one or more specified items.
MOVE
MV
Move-Item (mi) Moves one or more items from one
location to another location.
COPY
CP
Copy-Item (cpi) Copies one or more items from one
location to another location.
RENAME
REN
Rename-Item (rni) Renames a specified item.
Chapter 2: Using Exchange Management Shell
43
Common Command
Windows PowerShell
Command ( & Alias) Description
MD
MKDIR
param([string[]]$paths);
New-Item -type directory
-path $paths
Creates a new item of file type
directory. * *
TYPE
CAT
Get-Content (gc) Gets the contents of an item at a
specified location.
*Clear-Host is a function and not a true cmdlet.
**MD and MKDIR are functions that use cmdlet New-Item to make items of type Directory.
Windows PowerShell Drives
Windows PowerShell drives are local data stores exposed to the command line that you can access like a
file system drive. Several drives are provided by default. To see a list of all available drives on a server
use the Get-PSDrive cmdlet as shown in this example:
[PS] C:\ > Get-PSDrive
Name Provider Root CurrentLocation
---- -------- ---- ---------------
A FileSystem A:\
Alias Alias
C FileSystem C:\
cert Certificate \
D FileSystem D:\
Env Environment
Function Function
HKCU Registry HKEY_CURRENT_USER
HKLM Registry HKEY_LOCAL_MACHINE
Variable Variable
Z FileSystem Z:\
Windows PowerShell drives are exposed via providers, which are .
Pages:
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87