Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 619
  • Last Modified:

how to force workstations to shut down through group policy

How do I schedule workstations to shut down through group policy?
0
kenfitzgerald
Asked:
kenfitzgerald
  • 10
  • 6
  • 3
  • +1
1 Solution
 
Mike KlineCommented:
There is no native group policy setting that I know of
You can use different tools to do this
You can use the shutdown command or use psshutdown
http://technet.microsoft.com/en-us/sysinternals/bb897541.aspx
Thanks
Mike
0
 
kenfitzgeraldAuthor Commented:
I need to be able to schedule workstation shutdowns.
0
 
Lukasz ChmielewskiCommented:
you can not
either you add the shutdown script which shuts down a computer on a schedule (shutdown command) or you set logging hours for workstations
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kenfitzgeraldAuthor Commented:
can you add a shutdown script through group policy?
0
 
yuniel537Commented:
I think this may work for you http://www.experts-exchange.com/OS/Miscellaneous/Q_22839261.html#a19922572 this solution was alredy here so check it and let us know if it is what you wanted
0
 
kenfitzgeraldAuthor Commented:
I don't want to have to go to every pc, and I don't want to manually connect to each pc.
0
 
yuniel537Commented:
you don't have to you check this http://support.microsoft.com/kb/317371 you only have to create a *.bat file with the rigth arguments and run it that if you are the administrator all thos PC gonna get shot off.
0
 
kenfitzgeraldAuthor Commented:
So how do I schedule this? It looks like a command line tool. also is there a version for xp and server 2003?
0
 
yuniel537Commented:
you just have to use schedule task  on the server or your work station to run the *.bat that you already created, make sure that the credentials that you gonna provide are administrators ones.
0
 
Lukasz ChmielewskiCommented:
0
 
kenfitzgeraldAuthor Commented:
OK, I'm a little weak on writing code. I am familiar with scheduled tasks. so lets say I have 2 pcs named bob and tom. how would I write the script to force them to shutdown. if we need to include the admin credentials, then lets say they are administrator and password. thank you.
0
 
Lukasz ChmielewskiCommented:
so I think it would be eg.
at \\bob 23:00 /every:M,T,W,Th,F "runas /user:administrator password shutdown -s"
at \\tom 23:00 /every:M,T,W,Th,F "runas /user:administrator password shutdown -s"
0
 
kenfitzgeraldAuthor Commented:
so I create a batch file and schedule it with scheduled tasks right? do I need to install the tool you were just talkin about?
0
 
yuniel537Commented:
ok first you create a txt file then you write in it like this
shutdown \\Bob
shutdown \\tom
then you save the file and close it, after it's saved you go where the file is and change the extension txt for bat, and thats it, you have created your first batch code, now you use schedules task stuff
0
 
kenfitzgeraldAuthor Commented:
it looks like you have time and dates on this script. wouldn't that be set with the scheduled tasks? how would I write it if I wanted it to shutdown the workstation now, and then schedule when it runs with scheduled tasks?
0
 
yuniel537Commented:
Roads_Roads way:

at \\bob 23:00 /every:M,T,W,Th,F "runas /user:administrator password shutdown -s"
at \\tom 23:00 /every:M,T,W,Th,F "runas /user:administrator password shutdown -s"  
you don't have to use schedules task
and this way:
shutdowncode.bat

shutdown \\Bob
shutdown \\tom
you will need to use schedules task (be sure to provide Administrator rigths when creating the new task)
0
 
kenfitzgeraldAuthor Commented:
I don't understand what you just said. on one line it says I don't have to use scheduled tasks and the other it says I do. I would like to use scheduled tasks. are you saying all I have to do is type shutdown \\bob in a .bat file and it will shutdown the pc bob in scheduled tasks?
0
 
yuniel537Commented:
if you wanna use schedule task just do this:

shutdowncode.bat

shutdown \\Bob
shutdown \\tom
 
you will need to use schedules task (be sure to provide Administrator rigths when creating the new task)
0
 
kenfitzgeraldAuthor Commented:
I'm testing this on a spare workstation. the name of the workstation is 60NZ141 so I wrote the line like this:
shutdown \\60NZ141

is this right? it's not working. when I select the run now in scheduled tasks I get a command prompt that pops up and goes away quickly, but the workstation doesn't shutdown. do I need to use the -s switch somewhere?
0
 
kenfitzgeraldAuthor Commented:
ok I figured it out:
shutdown -m \\computername -s
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 10
  • 6
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now