- Understanding the PowerShell Basics
- What's New in PowerShell 2.0
- Discovering Basic PowerShell Commands
- Examples of PowerShell Commands
- Three Key Commands
- Take Advantage of Resources
Discovering Basic PowerShell Commands
The PowerShell also contains similar commands that you can use in the command prompt. Table 1 shows you some commands from the command prompt and the related cmdlets and aliases in PowerShell.
Table 1. Commands, Cmdlets, and Aliases in PowerShell
PowerShell Cmdlet |
PowerShell Alias |
Command Prompt |
Description |
Clear-Host |
cls, clear |
cls |
Clear the screen. |
Copy-Item |
cpi, copy, cp |
copy |
Copy files or a directory. |
Get-ChildItem |
gci, dir, ls |
dir |
List all files/directories in the current directory. |
Get-Location |
gl, pwd |
cd |
Show the current directory. |
Move-Item |
mi, move, mv |
move |
Move a file/directory. |
Remove-Item |
ri, del, erase, rmdir, rd, rm |
del, erase, rmdir, rd |
Delete a file/directory. |
Rename-Item |
rni, ren |
ren, rename |
Rename a file/directory. |
Set-Location |
sl, cd, chdir |
cd, chdir |
Change the current directory. |
Write-Output |
echo, write |
echo |
Print a string or variable onto on the screen. |