Copy-Paste PowerShell

Commands to copy. Scripts that preview before they change anything. Builders that fill in the blanks. Everything explained in plain English.

79 commands 8 scripts 9 builders 10 guides

Start here

New to PowerShell?

Read these in order. Then skip around.

  1. What is PowerShell?

    A shell and a scripting language that works with objects, not just text.

  2. Open PowerShell

    Windows Terminal, pwsh, and the old Windows PowerShell 5.1 host.

  3. Execution policy

    Why a script is blocked, what each policy means, and what to change (if anything).

  4. Run a script

    Download a .ps1, unblock it, and run it with parameters from the right folder.

  5. Pipelines

    Left to right, objects not text, and why Format-Table has to be last.

  6. Safety

    WhatIf, Confirm, and why you should not paste blindly from the internet (including this site).

  7. Objects and properties

    Why PowerShell output is not just text, and how to see and pick the parts you want.

  8. Variables

    Store a value with $name = ..., reuse it, and know when quotes expand it.

  9. Comparison operators

    -eq, -like, -match, and why > writes a file instead of comparing.

  10. Your profile and modules

    Make shortcuts that load every time, and add commands others have written.

Cheat sheet

Six to learn first

These cover most of week one.

Where-Object

Filter objects in the pipeline

Get-ChildItem | Where-Object { $_.Extension -eq '.md' }
Get-ChildItem

List files in a folder

Get-ChildItem -Path .\docs
Get-Process

List running processes

Get-Process | Sort-Object CPU -Descending | Select-Object -First 10
Test-Connection

Ping a host

Test-Connection -ComputerName 1.1.1.1 -Count 2
Get-Content

Read a text file

Get-Content -Path .\notes.txt
Get-Help

Read help for a command

Get-Help Get-ChildItem -Full

The commands

Grouped the way you look them up

Tools

When copying is not enough