Brian,

I have a batch script that I run on our sharepoint servers to turn off certain 
services when a reboot is called.
It's designed to run whether or not Microsoft initiates a shutdown due to 
patching or a user selects a reboot.
It turns out that Microsoft does use different methods for those scenario's.
For patching, I had to make a scheduled task that corresponded with our 
patching schedule for those servers.
Below is the group policy needed for the "user selects a reboot" scenario. And 
below that is the script in the bat file.

[cid:image002.jpg@01D1B4EC.C1CB9040]
eventcreate /L Application /T Information /ID 777 /D "StartOfTaskBatchFile"
sc stop "Windows SharePoint Services Timer"
iisreset /stop /noforce
sc stop w3svc
eventcreate /L Application /T Information /ID 777 /D "EndOfTaskBatchFile"

So again, in the above scenario, the user calls for a reboot and the group 
policy is then called into action to stop the services first.

If you think this helps and you want a copy of what I do in a patching 
situation.. let me know.

Cynthia Erno

From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On 
Behalf Of Brian McDonald
Sent: Monday, May 23, 2016 11:39 AM
To: mssms@lists.myitforum.com
Subject: [mssms] Re: Stopping Windows Services before Patching solution


ATTENTION: This email came from an external source. Do not open attachments or 
click on links from unknown senders or unexpected emails.


In this case there is an application server that uses SQL. There are services 
that need shut-down prior to the server rebooting or it causes issues in our 
environment.

________________________________
From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> 
<listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com>> on 
behalf of Lindenfeld, Ivan 
<ivan.lindenf...@fnf.com<mailto:ivan.lindenf...@fnf.com>>
Sent: Monday, May 23, 2016 10:05:17 AM
To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com>
Subject: [mssms] RE: Stopping Windows Services before Patching solution

I'm not sure I understand what you are asking.  Why do you need to shutdown 
Windows services prior to patching?

Ivan L

From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> 
[mailto:listsad...@lists.myitforum.com] On Behalf Of Brian McDonald
Sent: Monday, May 23, 2016 10:40 AM
To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com>
Subject: [mssms] Stopping Windows Services before Patching solution


Hello,

Does anyone have an automated method for handling the shutdown of windows 
services prior to applying patches?



I'm looking for a way to shut down the services, then apply the patches. I 
could write a script to shutdown the services, but not sure how to setup the 
patch deployment to know when the services are shut down. Has anyone dealt with 
anything like this before?



Brian M.

________________________________
NOTICE: The information contained in this message is proprietary and/or 
confidential and may be privileged. If you are not the intended recipient of 
this communication, you are hereby notified to: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately.




Reply via email to