Skip to content

Instantly share code, notes, and snippets.

@d4rkeagle65
d4rkeagle65 / Configure-NTPServer.ps1
Created January 7, 2022 15:02
Enables Windows Server to server NTP to clients on a network and configures the upstream time server to time.windows.com. Also creates a firewall rule to allows incoming connections to UDP port 123 for NTP clients.
Set-TimeZone -Name 'Eastern Standard Time'
Set-Service -Name W32Time -StartupType Automatic
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer' -Name 'Enabled' -Value 1 -Force
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Config' -Name 'AnnounceFlags' -Value 0xA -Force
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient' -Name 'Enabled' -Value 1 -Force
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient' -Name 'SpecialPollInterval' -Value 300 -Force
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Parameters' -Name 'Type' -Value 'NTP' -Force
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Parameters' -Name 'NtpServer' -Value 'time.windows.com,0x8' -Force
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Config' -Name 'MaxPosPhaseCorrection' -Value 1800 -Force
Set-ItemProperty -Path 'HK
@d4rkeagle65
d4rkeagle65 / Show-AllSystemTrayIconsWindows11.ps1
Last active June 13, 2025 16:47
Windows 11 Show All System Tray Icons
$RegistryPath = 'HKCU:\Control Panel\NotifyIconSettings'
$Name = 'IsPromoted'
$Value = '1'
Get-ChildItem -path $RegistryPath -Recurse | ForEach-Object {New-ItemProperty -Path $_.PSPath -Name $Name -Value $Value -PropertyType DWORD -Force }