Tag: wmi

750 script(s) tagged “wmi”

⚡ PowerShell 5.1+

Watch Connected Monitors for Changes

Polls Win32_DesktopMonitor on an interval and prints a line whenever the Connected Monitors count changes — a lightweig…

🧬 WQL / PowerShell

Win32_LogicalDisk: Querying Logical Disks Remotely (CIM Session)

Runs the same Win32_LogicalDisk WQL query against a remote computer over a CIM session — the modern, WinRM-based replac…

📜 VBScript (WSH)

Get Page File Usage Report (VBScript)

Queries Win32_PageFileUsage via WMI and prints Page File Usage to the console — no PowerShell required.

📄 JScript (WSH)

Get Battery Info Report (JScript)

Queries Win32_Battery via WMI and prints Battery Info to the console — JScript, VBScript's WSH sibling language.

🧬 WQL / PowerShell

Win32_OperatingSystem: Sorting Operating System Info (WQL has no ORDER BY)

WQL has no ORDER BY clause — this shows the standard workaround of piping Get-CimInstance results through Sort-Object o…

🧬 WQL / PowerShell

Win32_Battery: Battery Info (WQL)

A minimal WQL reference query against Win32_Battery — the raw SELECT statement plus a one-line runner, useful for learn…

🟣 C# / .NET 6+

Get Time Zone Settings Report (C#)

Queries Win32_TimeZone via WMI (System.Management) and prints Time Zone Settings to the console.

🧬 WQL / PowerShell

Win32_SoundDevice: Querying Sound Devices Remotely (CIM Session)

Runs the same Win32_SoundDevice WQL query against a remote computer over a CIM session — the modern, WinRM-based replac…

🧬 WQL / PowerShell

Win32_NetworkAdapter: Network Adapters (WQL)

A minimal WQL reference query against Win32_NetworkAdapter — the raw SELECT statement plus a one-line runner, useful fo…

⚡ PowerShell 5.1+

Backup Computer System Info List to JSON

Snapshots Computer System Info from Win32_ComputerSystem to a timestamped JSON file for later comparison or auditing.

🧬 WQL / PowerShell

Win32_Environment: Event-Driven Monitoring (WQL __InstanceCreationEvent)

Subscribes to WMI's __InstanceCreationEvent for Win32_Environment via Register-CimIndicationEvent — real WQL event quer…

🧬 WQL / PowerShell

Win32_Environment: Discovering Available Properties (Get-CimClass)

Uses Get-CimClass to list every real property and method Win32_Environment exposes on the current system, instead of gu…