⚡ PowerShell 5.1+
Show Seconds in Taskbar Clock
Adds a seconds display to the taskbar clock.
Set-ShowSecondsInTaskbarClock.ps1
<#
.SYNOPSIS
Show Seconds in Taskbar Clock.
.DESCRIPTION
Adds a seconds display to the taskbar clock.
Sets HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced \ ShowSecondsInSystemClock to 1.
.EXAMPLE
.\Set-ShowSecondsInTaskbarClock.ps1
#>
[CmdletBinding()]
param()
$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
if (-not (Test-Path $regPath)) {
New-Item -Path $regPath -Force | Out-Null
}
New-ItemProperty -Path $regPath -Name 'ShowSecondsInSystemClock' -Value 1 -PropertyType DWord -Force | Out-Null
Write-Host "Show Seconds in Taskbar Clock applied. Sign out and back in (or restart explorer.exe) for it to fully take effect." -ForegroundColor Green