Tag: hardware

286 script(s) tagged “hardware”

⚡ PowerShell 5.1+

Watch Processor Info for Changes

Polls Win32_Processor on an interval and prints a line whenever the Processor Info count changes — a lightweight way to…

🟣 C# / .NET 6+

Get USB Controllers Report (C#)

Queries Win32_USBController via WMI (System.Management) and prints USB Controllers to the console.

🟣 C# / .NET 6+

Get CD/DVD Drives Report (C#)

Queries Win32_CDROMDrive via WMI (System.Management) and prints CD/DVD Drives to the console.

🧬 WQL / PowerShell

Win32_ComputerSystemProduct: Sorting Computer System Product 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…

🖥️ Batch (CMD)

Export Computer System Product Info to CSV (Batch)

Uses wmic to export Computer System Product Info (Win32_ComputerSystemProduct) to a timestamped CSV file.

📜 VBScript (WSH)

Get Processor Info Report to File (VBScript)

Queries Win32_Processor via WMI and writes Processor Info to a timestamped text file, handy for scheduled logon/logoff …

📊 VBA (Excel)

Load Connected Monitors into Excel via WMI

Queries Win32_DesktopMonitor via GetObject("winmgmts:") and dumps every Connected Monitors row straight onto the active…

🧬 WQL / PowerShell

Win32_Battery: Finding Associated Objects (WQL ASSOCIATORS OF)

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

🧬 WQL / PowerShell

Win32_CDROMDrive: Event-Driven Monitoring (WQL __InstanceCreationEvent)

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

⚡ PowerShell 5.1+

Backup Keyboard Info List to JSON

Snapshots Keyboard Info from Win32_Keyboard to a timestamped JSON file for later comparison or auditing.

🧬 WQL / PowerShell

Win32_ComputerSystemProduct: Querying Computer System Product Info Remotely (CIM Session)

Runs the same Win32_ComputerSystemProduct WQL query against a remote computer over a CIM session — the modern, WinRM-ba…

🧬 WQL / PowerShell

Win32_CDROMDrive: Sorting CD/DVD Drives (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…