🧬 WQL / PowerShell
Win32_PointingDevice: Pointing Devices (WQL)
A minimal WQL reference query against Win32_PointingDevice — the raw SELECT statement plus a one-line runner, useful for learning WMI Query Language independent of any host language.
PointingDeviceQuery.ps1
<#
.SYNOPSIS
WQL reference: Pointing Devices (Win32_PointingDevice).
.DESCRIPTION
A minimal example of querying Win32_PointingDevice with a raw WQL SELECT
statement via Get-CimInstance -Query — useful as a WMI Query
Language reference, independent of any particular scripting
language's WMI binding.
The same query string works with Get-WmiObject -Query (older
PowerShell), GetObject("winmgmts:...").ExecQuery(...) in VBScript
or JScript, and ManagementObjectSearcher in C# — only the syntax
around the query changes, not the WQL itself.
.EXAMPLE
.\PointingDeviceQuery.ps1
#>
[CmdletBinding()]
param()
$wqlQuery = "SELECT Name, Manufacturer, NumberOfButtons FROM Win32_PointingDevice"
Write-Host "WQL: $wqlQuery" -ForegroundColor DarkGray
Get-CimInstance -Query $wqlQuery | Format-Table -Property Name, Manufacturer, NumberOfButtons -AutoSize