PowerShell automations
Copy-paste scripts for the jobs that come up every week on Windows fleets: checked, commented, and honest about their sharp edges. Each one is written to run as-is from an elevated prompt, and to be saved as a command in Moorfox and run across every machine you manage.
Check BitLocker status on every drive
One PowerShell command to report BitLocker encryption status, protection state and percentage for every fixed drive.
PowerShellClear a stuck print queue
Fix a stuck print job by stopping the Spooler service, deleting the queued files, and starting it again.
PowerShellGet the real last boot time and uptime
Get a Windows machine's last boot time and uptime with Get-CimInstance, and why Fast Startup makes the naive answer wrong..
PowerShellDisable USB storage devices
Block USB mass storage on a Windows machine with one registry value, and turn it back on when needed.
PowerShellList local administrators on a machine
List every member of the local Administrators group with PowerShell, including the domain accounts and groups nested inside it..
PowerShellDelete old Windows user profiles safely
Free disk space on shared machines by removing user profiles unused for 90 days, with -WhatIf first, and the traps to avoid..
PowerShellList installed software (without Win32_Product)
List installed programs from the registry uninstall keys, both 64-bit and 32-bit, and why you should never query Win32_Product..
PowerShellForce a Windows time sync
Force a machine to resync its clock with w32tm, check the result, and fix the common failure where the time service is stopped..
PowerShellDisk space report for every fixed drive
A disk space report in PowerShell: size, free space and percentage for every fixed disk, with an exit code you can alert on..
PowerShellCheck if a Windows machine has a pending reboot
Check the three registry locations that mean a Windows machine is waiting for a reboot: CBS, Windows Update, and pending file renames..