🧬 WQL / PowerShell

Win32_TimeZone: Time Zone Settings (WQL)

A minimal WQL reference query against Win32_TimeZone — the raw SELECT statement plus a one-line runner, useful for learning WMI Query Language independent of any host language.

By WindowsScripting.com · 862 B
TimeZoneQuery.ps1
<#
.SYNOPSIS
    WQL reference: Time Zone Settings (Win32_TimeZone).

.DESCRIPTION
    A minimal example of querying Win32_TimeZone 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
    .\TimeZoneQuery.ps1
#>

[CmdletBinding()]
param()

$wqlQuery = "SELECT Description, Bias, StandardName FROM Win32_TimeZone"

Write-Host "WQL: $wqlQuery" -ForegroundColor DarkGray
Get-CimInstance -Query $wqlQuery | Format-Table -Property Description, Bias, StandardName -AutoSize