check-time-zone
Checks the time zone
#Requires -Version 5.1
try {
[system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US"
$Time = $((Get-Date).ToShortTimeString())
$TZ = (Get-Timezone)
$offset = $TZ.BaseUtcOffset
if ($TZ.SupportsDaylightSavingTime) {
$TZName = $TZ.DaylightName
$DST=" +1h DST"
} else {
$TZName = $TZ.StandardName
$DST=""
}
Write-Host "✅ $Time $TZName (UTC+$($offset)$($DST))"
exit 0
} catch {
throw
}This script has no configurable parameters.