Moorfox

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.

PowerShell

Check BitLocker status on every drive

One PowerShell command to report BitLocker encryption status, protection state and percentage for every fixed drive.

PowerShell

Clear a stuck print queue

Fix a stuck print job by stopping the Spooler service, deleting the queued files, and starting it again.

PowerShell

Get 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..

PowerShell

Disable USB storage devices

Block USB mass storage on a Windows machine with one registry value, and turn it back on when needed.

PowerShell

List local administrators on a machine

List every member of the local Administrators group with PowerShell, including the domain accounts and groups nested inside it..

PowerShell

Delete 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..

PowerShell

List 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..

PowerShell

Force 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..

PowerShell

Disk 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..

PowerShell

Check 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..