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.
The script library
PowerShell and automation, with the context behind the code.
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.
One script that reads the WSUS, scan-source and Windows Update for Business settings on a device and tells you where it's really getting updates from, with a safe reset for leftovers.
Compare files, whole folder trees, or a download against its published checksum with Get-FileHash, and get back a clear Match or Different for every file.
Register the Microsoft Update service through the Windows Update Agent's own COM API, so devices pick up Office and other Microsoft product updates, not just Windows.
One report for every kind of service account, gMSAs and old-school user accounts alike, showing password age, SPNs, delegation and who can read the gMSA password.
Create a Tier 0 admin group, keep it where only Tier 0 can touch it, and give it full control of the Tier 0 OU. Preview the whole thing with -WhatIf first.
Put a BIOS admin password on new Dells, or change the old one across the fleet, with both passwords handed over at runtime.
Repack ZIPs as 7z, see exactly how much space each one saved, and keep the ZIP when the 7z wouldn't be any smaller.
Archive conversion workshop · Note 3 ↗Find project folders that haven't changed in N days, zip each one to an archive location with the date of its last change, verify it, and optionally clear out the original.
Switch workstations to High Performance (or Ultimate Performance) by GUID, restore the plan if the image hid it, and don't end up with five copies of it.
Integrity-test every ZIP, 7z, RAR and TAR in a folder, then optionally repack the good ones into a single format. Broken archives never get touched.
Archive conversion workshop · Note 1 ↗Clear the BIOS setup password on Dell PCs and see exactly what changed, with the password supplied at runtime instead of sitting in a package.