Skip to content

Instantly share code, notes, and snippets.

@kasuken
Created November 15, 2019 09:21
Show Gist options
  • Save kasuken/84850787ec5b061ad8a3cef9c8fc099a to your computer and use it in GitHub Desktop.
Save kasuken/84850787ec5b061ad8a3cef9c8fc099a to your computer and use it in GitHub Desktop.
A simple command file to restart all SharePoint 2016 services on the server
@echo off
@echo Stopping Sharepoint services...
@echo Restarting The SharePoint Timer Service...
net stop SPTimerV4
net start SPTimerV4
@echo Restarting The SharePoint Administration Service...
net stop SPAdminV4
net start SPAdminV4
@echo Restarting The SharePoint Search Service...
net stop SPSearchHostController
net stop OSearch16
net start SPSearchHostController
net start OSearch16
@echo Restarting The SharePoint Trace Service...
net stop SPTraceV4
net start SPTraceV4
@echo Restarting IIS...
iisreset -restart -noforce
echo all the SP services have been restarted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment