Tag: wmi

750 script(s) tagged “wmi”

πŸ“œ VBScript (WSH)

Get Network Shares Report to File (VBScript)

Queries Win32_Share via WMI and writes Network Shares to a timestamped text file, handy for scheduled logon/logoff scri…

πŸ–₯️ Batch (CMD)

Get USB Controllers Report (Batch)

Uses wmic to list USB Controllers (Win32_USBController) straight from the command line.

🧬 WQL / PowerShell

Win32_USBController: Discovering Available Properties (Get-CimClass)

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

⚑ PowerShell 5.1+

Get Logical Disks Report

Queries Win32_LogicalDisk via WMI and reports Logical Disks in a formatted table, with an optional CSV export.

πŸ“Š VBA (Excel)

Export Operating System Info to CSV via WMI (VBA)

Queries Win32_OperatingSystem via WMI and writes every Operating System Info row straight to a CSV file in Documents, u…

🐍 Python 3.10+

Export Page File Usage to CSV (Python)

Exports Page File Usage (Win32_PageFileUsage) to a timestamped CSV file via wmic.

πŸ“Š VBA (Excel)

Load Battery Info into Excel via WMI

Queries Win32_Battery via GetObject("winmgmts:") and dumps every Battery Info row straight onto the active worksheet, n…

🧬 WQL / PowerShell

Win32_NetworkAdapter: Querying Network Adapters Remotely (CIM Session)

Runs the same Win32_NetworkAdapter WQL query against a remote computer over a CIM session β€” the modern, WinRM-based rep…

🟣 C# / .NET 6+

Backup Physical Disk Drives to JSON (C#)

Snapshots Physical Disk Drives (Win32_DiskDrive) to a timestamped JSON file via System.Management and System.Text.Json.

🧬 WQL / PowerShell

Win32_USBController: Sorting USB Controllers (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…

⚑ PowerShell 5.1+

Backup Network Adapter Configuration List to JSON

Snapshots Network Adapter Configuration from Win32_NetworkAdapterConfiguration to a timestamped JSON file for later com…

🧬 WQL / PowerShell

Win32_ComputerSystem: Finding Associated Objects (WQL ASSOCIATORS OF)

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