PowerShell as cmd.exe or Bash

, , …,

PowerShell has many aliases that emulates cmd.exe or Bash.

If you are familiar with cmd.exe or bash, you can start using PowerShell as replacement.

PowerShell command names are not case sensitive. Get-ChildItem = get-childitem.

Path Manipulation
PowerShell CmdletPowerShell aliascmd.exebashPurpose
Set-Locationsl, cd, chdircd, chdircdChange dir
Get-Locationgl, pwdcdpwdShow current dir
Get-ChildItemgci, dir, lsdirlsList current dir content
Push-LocationpushdpushdpushdSave current path to stack
Pop-LocationpopdpopdpopdSwitch to last pushed dir
File Manipulation
PowerShell CmdletPowerShell aliascmd.exebashPurpose
Copy-Itemcpi, copy, cpcopycpCopy file or dir
Remove-Itemri, del, erase, rmdir, rd, rmdel, erase, rmdir, rdrm, rmdirDelete file or dir
Rename-Itemrni, renren, renamemvRename file or dir
Move-Itemmi, move, mvmovemvMove file or dir
Text Processing
PowerShell CmdletPowerShell aliascmd.exebashPurpose
Get-Contentgc, type, cattypecatGet file content
Select-Stringfind, findstrgrepShow texts matching a pattern
env var Manipulation
PowerShell CmdletPowerShell aliascmd.exebashPurpose
Write-Outputecho, writeechoechoPrint to standard output
Set-Variablesv, setsetsetSet/create variable
Process Management
PowerShell CmdletPowerShell aliascmd.exebashPurpose
Get-Processgps, pstlist, tasklistpsList running processes
Stop-Processspps, killkill, taskkillkillStop a running process
Help Facilities
PowerShell CmdletPowerShell aliascmd.exebashPurpose
Clear-Hostcls, clearclsclearClear the screen
Get-Helphelp, manhelpmanHelp on commands

For more complex unix commands, see: PowerShell vs Bash Compared (PowerShell for Unixers)

blog comments powered by Disqus