PowerShell as cmd.exe or Bash

By Xah Lee. Date: . Last updated: .

PowerShell has many aliases, functions, cmdlets, that emulate 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

Help

Help
full namecmd.exebashPurpose
Get-HelphelpmanHelp
Get-Commandwherewhichfind command

Path Manipulation

Path Manipulation
full namecmd.exebashPurpose
Set-Locationcd, chdircdChange dir
Get-Locationecho %cd%pwdShow current dir
Get-ChildItemdirlsList dir
Push-LocationpushdpushdSave current path
Pop-LocationpopdpopdSwitch to last path

File Manipulation

File Manipulation
full namecmd.exebashPurpose
Copy-ItemcopycpCopy file or dir
Remove-Itemdel, erase, rmdir, rdrm, rmdirDelete file or dir
Rename-Itemren, renamemvRename file or dir
Move-ItemmovemvMove file or dir

Text Processing

Text Processing
full namecmd.exebashPurpose
Get-ContenttypecatGet file content
Select-Stringfind, findstrgrepShow texts matching a pattern

Environment Variable

env var Manipulation
full namecmd.exebashPurpose
Write-OutputechoechoPrint to standard output
Set-VariablesetsetSet/create variable

Process Management

Process Management
full namecmd.exebashPurpose
Get-Processtlist, tasklistpsList running processes
Stop-Processkill, taskkillkillStop a running process

For more complex unix commands, see: PowerShell vs Bash

If you have a question, put $5 at patreon and message me.

PowerShell

xah powershell logo