Fixes tagged PowerShell

5 fixes · back to all fixes

PowerShellWindows

A log write killed the job it was logging, and the exit code still said 0

$ErrorActionPreference = 'Stop' is the setting every PowerShell guide recommends. It also promotes a failed Add-Content into a terminating error, so a file lock on the log file aborts the run from a line that does not matter, in the middle of work that does.

3 min read →

WindowsAntivirus

IDP.HELU.PSE85: the antivirus killed my script silently, and it was right to be suspicious

A script that read a local credential file and POSTed it onward stopped running. No error, no exit code, no log line, no popup. It matched the behavioural signature of a token stealer, and the fix was to stop looking like one rather than to add an exception.

5 min read →

AutomationPowerShell

My dashboard said zero for two months, and the number was never wrong

A daily digest reported zero pins published, every day, for sixty one reports in a row. The weekly review escalated it to zero activity, stalled, and that reached my decision log. Pins were publishing the whole time. The counter was reading three spreadsheets that had finished two months earlier, so zero was the only answer it could ever have given.

6 min read →

PowerShellWindows

PowerShell mangles quotes in CLI args, so pass JSON by file

A curl or gh command with inline JSON works in bash and cmd but the payload arrives corrupted from PowerShell. PowerShell rewrites embedded double quotes when handing args to native executables. Pass the payload by file or stdin instead.

2 min read →

PowerShellExpo

PowerShell globbing mangles Expo Router [id] file paths

Reading and writing files at bracketed paths like app/[id]/index.tsx failed because PowerShell treats [id] as a wildcard character class.

1 min read →