Practical uses
- Administer Windows and Microsoft cloud services
- Automate structured system tasks
- Manage Active Directory and Microsoft 365
- Build cross-platform DevOps scripts
Microsoft's cross-platform shell for automating Windows, Linux and macOS.
PowerShell is Microsoft's shell and scripting language, and it runs on Windows, Linux and macOS. Unlike Bash, which passes text between commands, PowerShell passes objects, so you read properties instead of parsing output.
Windows includes PowerShell 5.1. For these lessons, install PowerShell 7 or later, which runs on Windows, macOS and Linux.
# 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 CurrentUserLearn the basics first, then pick up these tools when a project needs them.