PowerShell: Start, Exit, Abort Command

By Xah Lee. Date: .

Start PowerShell

Microsoft Windows

In Windows, press ❖ Window (or ❖ Window+r) then type:

pwsh
Start PowerShell version 6 or later, if you have it installed.
powershell
(No longer developed) Start PowerShell version 5 or earlier.

Mac

Type pwsh in terminal to start it.

Linux

Type pwsh in terminal to start it.

Exit

type exit to quit.

Cancel/Abort a Command

Press Ctrl+c to cancel a command.

Useful when you run some command by that took too long or by mistake.

PowerShell Intro

PowerShell

Practical How-To

list files

list dirs

on dir

on file

Windows config

zip tar

misc


PowerShell in Depth

Programing PowerShell

Value Types

String

Variable

Boolean

Conditional

Data Structure

Loop and Iteration

Input/Output

Function

Profile and Script

Script Examples