Thursday, November 17, 2011

Scripting: Disable Admin-Related Auto-Starts on Windows Servers...

One thing I find really annoying about Windows Servers is the popups you get very time you log in for the first time ('Manage Your Server' for Windows Server 2003 and 'Server Manager' for Windows Server 2008). Of course you can check a box after the initial login to tell it not to pop up the next time you login, but that doesn't suppress it for anyone else who logs in. Also what if you are using MDT to create an image of a Server OS and would like to banish these popups for every login on *all* future deployments? There's probably a host of ways to do this, but I cracked it with the following batch scripts:

Disable Auto-Start Initial Configuration Tasks for Windows Server 2008:

@ECHO OFF ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: TITLE Disable Auto-Start Initial Configuration Tasks for Windows Server 2008 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ECHO Disabling Auto-Start Initial Configuration Tasks for Windows Server 2008... ECHO. :: Change "DoNotOpenInitialConfigurationTasksAtLogon" value to "1" to disable the Initial Configuration Tasks Auto-Start: REG ADD "HKLM\SOFTWARE\Microsoft\ServerManager\Oobe" /v DoNotOpenInitialConfigurationTasksAtLogon /t REG_DWORD /d 1 /f :: Uncomment "PAUSE" to view script results: :: ECHO. :: PAUSE
Disable Auto-Start Manage Your Server for Windows Server 2003:

@ECHO OFF ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: TITLE Disable Auto-Start Manage Your Server for Windows Server 2003 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ECHO Disabling Auto-Start Manage Your Server for Windows Server 2003... ECHO. :: Disable "Manage Your Server" Auto-Start for the current user: REG DELETE "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Setup\Welcome" /v srvwiz /f REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\srvWiz" /v CYSMustRun /t REG_SZ /d 0 /f :: Create policy to set "DisableShowAtLogon" value to "0" to disable "Manage Your Server" Auto-Start for subsequent logins: REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\MYS" /v DisableShowAtLogon /t REG_DWORD /d 0 /f :: Uncomment "PAUSE" to view script results: :: ECHO. :: PAUSE
You can run them manually or add them to an MDT task sequence.

No comments:

Post a Comment