Wednesday, February 1, 2012

Powershell Aliases

An Alias is simply a different way of doing the same task. So if you are used to other systems (e.g. CMD or Linux), you can most likely migrate that task. Below is a list of such tasks.


If the alias you wish does not exist, no problem. Here is how to create your own.

Set-Alias [-Name] [-Value]

If you want to see what Aliases you have set,

Get-Alias [[-Name] ]


PowerShell (Cmdlet)

PowerShell (Alias)

Get-ChildItem

gci, dir, ls

Get-Content

gc, type, cat

Get-Command

gcm

Get-Help

help, man

Clear-Host

cls, clear

Copy-Item

cpi, copy, cp

Move-Item

mi, move, mv

Remove-Item

ri, del, erase, rmdir, rd, rm

Rename-Item

rni, ren, mv

Get-Location

gl, pwd

Pop-Location

popd

Push-Location

pushd

Set-Location

sl, cd, chdir

Tee-Object

tee

Write-Output

echo, write

Get-Process

gps, ps

Stop-Process

spps, kill

Select-String

n/a

Set-Variable

sv, set




No comments: