Link to home
Start Free TrialLog in
Avatar of cawasaki
cawasaki

asked on

SCRIPT to reboot WINDOWS 2008 server with scheduled task

Hello,

I need a script to reboot windows 2008 server with scheduled task.

Thanks
Avatar of lof
lof
Flag of United Kingdom of Great Britain and Northern Ireland image

you may reboot you server with a command

shutdown -r

you may schedule such task
Do you just want to reboot the server at a specified hour ?  or do you need to check if some process are running and wait for them to rebook?

Btw, why do you need to do that? if you can explain us a little bit more the problem maybe theres a better solution for it
ASKER CERTIFIED SOLUTION
Avatar of farazhkhan
farazhkhan
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cawasaki
cawasaki

ASKER

hi,

i need this because the admin of server has not  access to this server (no TSE access...), he has just right to open scheduled task mmc from remote server.

shutdown -r -f -t 60 -m \\windows2008server

==> 1-this command reboot the server properly?
2- can I execute this command from remote server on cmd prompt?

Thanks for your help
hello,
but the remote admin doesnt have acces to the server because you set up explicit rules acessing it or becauae there's connectivity problems/firewalls,etc? if this is the case i will suggest installing a simple remoting app like teamviewer.com on the host, and then the remote user would be able to easily connect and reboot the server on demand with a single click
You can execute this command on a remote server if the user you execute it with has local administrator rights on the server, or at least the rights to shutdown the server.
You can check this in the local security policy under Administritive tools. Check under Local Policy/User Rights assignment/Shut down the system
If this is not possible you must run it on the local machine with a local administrator
Hi,

Yes the user is a local administrator of server.

I have setup a gpo to block tse session on server!

Ok, i try to execute this command from remote server:

shutdown -r -f -t 60 -m \\windows2008server

Thanks
Was the problem resolved or do you still need help on that one?