Tuesday, June 6, 2017

Shutdown Event Tracker

Just found this handy PowerShell script that disables that annoying little popup that asks you why you are shutting Windows down (that's my business, Windows doesn't need to know):

if ( -Not (Test-Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability'))
{
New-Item -Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT' -Name Reliability -Force
}

Set-ItemProperty -Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability' -Name ShutdownReasonOn -Value 0

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.