⚡ PowerShell 5.1+
Disable Lock Screen Notifications
Stops app notifications from appearing on the lock screen.
Set-DisableLockScreenNotifications.ps1
<#
.SYNOPSIS
Disable Lock Screen Notifications.
.DESCRIPTION
Stops app notifications from appearing on the lock screen.
Sets HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications \ LockScreenToastEnabled to 0.
.EXAMPLE
.\Set-DisableLockScreenNotifications.ps1
#>
[CmdletBinding()]
param()
$regPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications'
if (-not (Test-Path $regPath)) {
New-Item -Path $regPath -Force | Out-Null
}
New-ItemProperty -Path $regPath -Name 'LockScreenToastEnabled' -Value 0 -PropertyType DWord -Force | Out-Null
Write-Host "Disable Lock Screen Notifications applied. Sign out and back in (or restart explorer.exe) for it to fully take effect." -ForegroundColor Green