Hope someone can help me with the following query, We have recently upgraded SMS to SCCM successfully.However we are trying to implement shutdown of PC's every night on our network. I have created a batch file "shutdown.exe -s -f -t 60 -c "Shutting System Down" and this will successfully deploy and action via SCCM. The problem I was encountering when I was testing on SMS 2003 it;'s that if the PC is already shutdown the advertisement will run when the PC turns on in the morning and it will shutdown. Therefore I am making use of the maintenance window to set a duration time in SCCM? the collection can be advertised. So I set duration in maintenance window in collection and in package/program requirements I have set the same time as maintenance window for "maximum allowed run time".

Am I missing something to action? and how can I ensure that the PC will not shutdown if turned on in the morning?
Many Thanks
1 Comment   [ + ] Show Comment


  • What you can do is have your batch file ping the machine, if it gets a request timed out response, exit the script, else run the shutdown down command
Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Had a good laugh reading your post...

You may want to expire advertisements every morning - there are scripts you can write or "borrow" that would change advertisement properties to work around your maintenance windows. Would be nice to have this functionality "out of the box" in SMS/SCCM, wouldn't it?
Answered 03/10/2009 by: revizor
Third Degree Blue Belt

Please log in to comment
Many thanks for the feedback, does anyone have occured issues trying to use SCCM to shutdown PC's every night? or would third party software's be the best method?

Many Thanks
Answered 03/10/2009 by: Pravin_lfc
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity