How to disable Shutdown Event Tracker in Windows Server 2008/2012/2016

I’m currently busy building some test environment which comprise multiple Server 2008 R2 boxes. I decided that I need to disable Shutdown Event Tracker as I don’t need this in test environment (it is that pesky feature which keep asking you to specify your reason for reboot or shutdown). It is controlled by “Display Shutdown Event Tracker” group policy setting which can be found under Computer Configuration > Administrative Templates > System but I guess scripting way is more preferable. So easiest way to disable Shutdown Event Tracker is to run this PowerShell script which in fact will set registry setting which corresponds to relevant group policy option:

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

Leave a Reply

Your email address will not be published. Required fields are marked *