PowerShell WMI Event Subscription: React to System Events
Instead of polling for changes, WMI event subscriptions let your script react instantly when a process starts, a service stops, or a USB drive is inserted. Here is how to use them.
Commands Tips
Instead of polling for changes, WMI event subscriptions let your script react instantly when a process starts, a service stops, or a USB drive is inserted. Here is how to use them.
Transient failures kill long-running automation. This guide shows how to wrap any PowerShell command in a Retry-Command function with configurable backoff, jitter, and maximum
Scheduled Task management through the GUI is fine for one machine, but automating it across a fleet requires PowerShell. This guide covers creation, modification, and bulk
Stale computer accounts bloat AD, create licensing noise, and are a security risk. This two-phase script finds inactive machines, disables them first, then deletes after a
Compare-Object is one of PowerShell’s most misunderstood cmdlets. SyncWindow, PassThru, and multi-property diffing unlock powerful use cases for configuration drift detection.
Assigning Intune policies to hundreds of groups manually is error-prone. This script uses the Graph SDK to read policy definitions and bulk-assign them to target groups
WinRM is blocked in many environments. PowerShell 7 supports SSH-based remoting as a drop-in alternative. This guide covers sshd setup on Windows and Linux targets.
Diagnosing network saturation requires per-adapter utilization data. This script captures Windows Performance Counters for network interfaces and formats a readable bandwidth
Keeping software license compliance across hundreds of machines is only feasible with automation. This script queries the registry across your fleet and flags violations clearly.
Azure Automation runbooks let you run PowerShell in the cloud without a server. This guide walks from creating your first runbook to production-grade scheduling with Managed