locked
Schedule a Shutdown Task using GPO RRS feed

All replies

  • Hi!

    You can achieve this with  the steps below:

    1) Open a Group Policy Object that is targeted to your computers and go to Computer Configurations > Preferences > Control Panel Settings > Scheduled Tasks

    2) Create a new Scheduled Task to run with the shutdown.exe command.

    3) There are two text boxes to fill in the path and values. The first one is for the command, there you go with
    C:\windows\system32\shutdown.exe under that, there's another text box you can put arguments in. There you type -f -s

    Like in the picture below:

    Hope you find this useful.


    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com  LinkedIn:   

    Friday, June 1, 2018 9:15 PM
  • I did the same setting you suggested.

    But I am not able to see the task in task scheduler on the computer.


    Dp

    Friday, June 1, 2018 9:28 PM
  • Did you apply the GPO to the right OU? also remember to do a gpupdate /force

    Blog: https://thesystemcenterblog.com  LinkedIn:   

    Friday, June 1, 2018 9:29 PM
  • I did that too.

    Thank you


    Dp

    Friday, June 1, 2018 9:30 PM
  • 

    Dp

    Friday, June 1, 2018 9:39 PM
  • Try using the Scheduled Task (At least Windows 7), in the "Security options" (the running account) put a member of the Domain Administrators. In Actions have "Start a program" and put C:\windows\system32\shutdown.exe in the program/script and the -f -s in the "Add arguments(optional).


    Blog: https://thesystemcenterblog.com  LinkedIn:   

    Friday, June 1, 2018 9:56 PM
  • It's still not creating the task on task scheduler. FYI, I have windows 10 system that I am applying GPO.

    Thanks


    Dp

    Friday, June 1, 2018 10:31 PM
  • When you do the gpresult /h C:\gporeport.html make sure you run it as an administrator.

    I just tested this in my lab and it worked fine. 

    You could try changing to "Run whether user is logged on or not" and use the account "SYSTEM" (NT Authority\System"



    Blog: https://thesystemcenterblog.com  LinkedIn:   

    • Proposed as answer by Leon Laude Friday, June 1, 2018 11:10 PM
    Friday, June 1, 2018 10:42 PM
  • It worked just fine with SYSTEM account.

    Thanks for your help.


    Dp

    Friday, June 1, 2018 10:52 PM
  • I'm happy to hear it worked out for you! :)

    If you found this helpful, remember to mark as answer.


    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com  LinkedIn:   

    Friday, June 1, 2018 10:54 PM