PS

PowerShell

beginner

Bash for Windows. Except it's also on Linux now. And it's object-oriented. Long story.

PowerShell is Microsoft's powerful shell and scripting language. Unlike Bash which works with text, PowerShell works with objects. This makes parsing command output dramatically easier. It's cross-platform and surprisingly capable.

Windows AdministrationAzure DevOpsCI/CDSystem AutomationActive Directory
0%
0/8 lessons

Setup

PowerShell 5.1 is built into Windows. PowerShell 7+ (cross-platform) is recommended for scripting and available everywhere.

Bash
# PowerShell 5.1 is built in — press Win+X, select "Terminal"
# For PowerShell 7+ (recommended):
winget install Microsoft.PowerShell

# Or download from:
# github.com/PowerShell/PowerShell/releases

# Check version:
$PSVersionTable.PSVersion

# Set execution policy to allow local scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Lessons

1
Your First Script
PowerShell scripts have the .ps1 extension. The first thing you need to know: Po
2
Variables & Types
PowerShell variables can hold any .NET type. Numbers, strings, arrays, hashtable
3
Control Flow
PowerShell control flow is standard C-family with a few extras. The switch state
4
Functions & Cmdlets
PowerShell functions can behave like cmdlets — with parameters, validation, help
5
Working with Objects
This is what makes PowerShell unique. Everything is an object. You don't parse t
6
Files & the Filesystem
PowerShell's file cmdlets are powerful and consistent. They work with local file
7
Mini Project: System Info Script
Build a script that gathers system information and outputs a clean, formatted re
8
PowerShell Cheatsheet
Cmdlets, objects, and scripting syntax on one page.