Last active
May 8, 2022 18:42
-
-
Save Indemnity83/8ef598b5df721b1f3d3e to your computer and use it in GitHub Desktop.
Windows Small Business Server Quick Restart/Shutdown Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM SBS Quick Shutdown Script | |
REM | |
REM By: Kyle Klaus | |
REM Date: September 22, 2011 | |
REM Version: 1.1 | |
REM | |
REM One of the ways to speed up an SBS reboot is to shutdown certain | |
REM key services before clicking the Restart button on updates or when | |
REM needing to manually reboot the server. | |
REM | |
REM By downing the Exchange services, SMTP, and IIS beforehand, one | |
REM will see a marked decrease in the amount of time the SBS box will | |
REM take to shutdown/reboot. | |
REM | |
CHOICE /M "Are you sure you want to restart the computer?" | |
IF ERRORLEVEL 2 GOTO end | |
NET stop mspop3connector | |
NET stop msexchangeis | |
NET stop msexchangemgmt | |
NET stop resvc | |
NET stop msexchangemta | |
NET stop msexchangesa | |
NET stop smtpsvc | |
NET stop w3svc | |
ECHO The computer is restarting | |
SHUTDOWN /r /d p:0:0 /f /t 0 /c "User Initiated restart" | |
:end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM SBS Quick Shutdown Script | |
REM | |
REM By: Kyle Klaus | |
REM Date: September 22, 2011 | |
REM Version: 1.1 | |
REM | |
REM One of the ways to speed up an SBS reboot is to shutdown certain | |
REM key services before clicking the shutdown button on updates or when | |
REM needing to manually reboot the server. | |
REM | |
REM By downing the Exchange services, SMTP, and IIS beforehand, one | |
REM will see a marked decrease in the amount of time the SBS box will | |
REM take to shutdown/reboot. | |
REM | |
CHOICE /M "Are you sure you want to shutdown the computer?" | |
IF ERRORLEVEL 2 GOTO end | |
NET stop mspop3connector | |
NET stop msexchangeis | |
NET stop msexchangemgmt | |
NET stop resvc | |
NET stop msexchangemta | |
NET stop msexchangesa | |
NET stop smtpsvc | |
NET stop w3svc | |
ECHO The computer is shutting down | |
SHUTDOWN /s /d p:0:0 /f /t 0 /c "User Initiated shutdown" | |
:end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment