Wes Ellis./ a personal notebook
Technology. Stories. Side projects.
A few things worth writing down.

A thread · 7 notes · Engineering

PowerShell craft.

Small habits and tools that make scripts safer to write, run and hand to someone else.

  1. 1
    Engineering2 min read

    The -WhatIf Trap Hiding in ForEach-Object

    A dry run that quietly lies to you. Why ForEach-Object's property shorthand returns nothing under -WhatIf, and the one-line fix.

  2. 2
    Script Library2 min read · Script

    Check PowerShell Scripts for Syntax Errors Without Running Them

    Use PowerShell's own parser to catch typos and broken brackets in a whole folder of scripts, before anything runs.

  3. 3
    Script Library1 min read · Script

    Getting the Console Width in PowerShell (Even When There Isn't One)

    A width check that works in a real console, in VS Code, and in scheduled tasks and CI runners where there's no window to measure.

  4. 4
    Script Library2 min read · Script

    Audit a Windows Service Across Many Computers with PowerShell

    Feed it a list of computers and a service name, get back one row per machine saying whether it's installed, running, and how it starts.

  5. 5
    Script Library2 min read · Script

    List Installed Software on Windows with PowerShell

    A quick, safe software inventory from the registry, local or remote, that returns objects you can filter and export instead of a wall of colored text.

  6. 6
    Script Library2 min read · Script

    Finding and Disabling SMBv1 Without Breaking the Scanner

    Audit who still talks SMBv1 to your machines, then switch it off for good, with one script and three modes.

  7. 7
    Script Library2 min read · Script

    Monitoring Azure Resource Costs with PowerShell

    Find out which resource groups are eating your Azure budget, straight from PowerShell, no portal clicking required.