Tag: wmi

750 script(s) tagged “wmi”

🧬 WQL / PowerShell

Win32_OperatingSystem: Finding Associated Objects (WQL ASSOCIATORS OF)

Demonstrates Get-CimAssociatedInstance, the modern CIM equivalent of WQL's ASSOCIATORS OF syntax, against a Win32_Opera…

⚑ PowerShell 5.1+

Watch Environment Variables for Changes

Polls Win32_Environment on an interval and prints a line whenever the Environment Variables count changes β€” a lightweig…

πŸ“œ VBScript (WSH)

Get Local User Accounts Report (VBScript)

Queries Win32_UserAccount via WMI and prints Local User Accounts to the console β€” no PowerShell required.

πŸ“Š VBA (Excel)

Export Battery Info to CSV via WMI (VBA)

Queries Win32_Battery via WMI and writes every Battery Info row straight to a CSV file in Documents, using plain VBA fi…

πŸ–₯️ Batch (CMD)

Get System Drivers Report (Batch)

Uses wmic to list System Drivers (Win32_SystemDriver) straight from the command line.

⚑ PowerShell 5.1+

Watch System Drivers for Changes

Polls Win32_SystemDriver on an interval and prints a line whenever the System Drivers count changes β€” a lightweight way…

🧬 WQL / PowerShell

Win32_BIOS: Sorting BIOS 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…

πŸ“„ JScript (WSH)

Get Printers Report (JScript)

Queries Win32_Printer via WMI and prints Printers to the console β€” JScript, VBScript's WSH sibling language.

πŸ“Š VBA (Excel)

Load Startup Programs into Excel via WMI

Queries Win32_StartupCommand via GetObject("winmgmts:") and dumps every Startup Programs row straight onto the active w…

πŸ“„ JScript (WSH)

Get Computer System Product Info Report (JScript)

Queries Win32_ComputerSystemProduct via WMI and prints Computer System Product Info to the console β€” JScript, VBScript'…

πŸ“Š VBA (Excel)

Load Page File Usage into Excel via WMI

Queries Win32_PageFileUsage via GetObject("winmgmts:") and dumps every Page File Usage row straight onto the active wor…

🐍 Python 3.10+

Backup Environment Variables to JSON (Python)

Snapshots Environment Variables (Win32_Environment) to a timestamped JSON file for later comparison or auditing.