?
Solved

Apply shutdown policy after office hours in a Domain

Posted on 2006-04-25
13
Medium Priority
?
330 Views
Last Modified: 2011-09-20
Hello,

Can someone help in this please. I read so many threads and didn't get the answer i needed. i want to apply a shutdown policy on some selected computers in my domain after office hours after checking out that these PC were idle, logged off or locked. but the problem i'm facing here is that some employees ( or ADMINS) SOMETIME are leaving their PC ON downloading files or runningscheduled jobs  after office hours and dont want thier PC to be shutted down!!

i need to apply this through Group Policy. but as i understood i need to use a third party tool for the scheduling part.

regards,
A.A
0
Comment
Question by:AZZA-KHAMEES
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 16532995
Hi AZZA-KHAMEES,

why not use this free tool
http://www.sysinternals.com/Utilities/PsShutdown.html

set up a file on your server that shuts down all machine and run it when you want it too, or set as a scheduled task on the server

you will need admn rights on each machine you want to shutdown

Cheers!
0
 

Author Comment

by:AZZA-KHAMEES
ID: 16533036
thank u jay jay for your instance reply. but for example i would like to shut down some PCs at 3 pm automaticlly for example without using scheduled tasks because users have admin rights on thier PCs, where can i spicify the time?

regards,
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 16533054
thats no problem :)

you can set a scheduled task on your server, that then sets off the script, which then affects all machines, users wouldnt even see it and in no way could edit it as it sits on your server..

0
Industry Leaders: 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!

 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 16533081
sorry that i can give out the script, i am learning a bit of scripting at the moment though, so if you can get a direct script given to you, send me an email and ill see what i can for you yeah?
0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 16533083
AZZA-KHAMEES,

oops wrong question mate sorry!
0
 
LVL 15

Expert Comment

by:Naser Gabaj
ID: 16533093
Greetings AZZA-KHAMEES,

This thread talking about the same subject, have a look and let me know:

http://groups.google.com/group/microsoft.public.windows.server.scripting/browse_thread/thread/96b8d153e9874bf3/699628a087dd88d6

Good Luck!

Naser
0
 
LVL 15

Expert Comment

by:Naser Gabaj
ID: 16533143
Also, you can implement OU's called shutdwon GP, Move those users that you wanted to shutdown thier machines, and then implement the policy only on those OU's only, using (Startup/Shutdwon) scripting under the following Path:

Computer configuration>windows settings>scripts(Startup/Shutdwon).

HTH

Good luck

Naser

0
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 16533151
Naser,

how does that work with sheduling though?
0
 
LVL 25

Expert Comment

by:mikeleebrla
ID: 16533369
shutdown.exe is built into the windows OS (well in 2K it was part of the resource kit) but you can download it here.

http://www.mameworld.net/ultrastyle/download.htm

run shutdown.exe /? to see the switches that you want to add.
then just create a batch file with those switches
then just either create a local scheduled task or a domain GPO to run that batch file.





0
 
LVL 6

Expert Comment

by:JimsZ
ID: 16533384
first off... you can create a batch file such as this for each pc.  Just put that into a text msg, then rename as .bat   This would shut each computer down in 300 seconds.  They can manually stop it by clicking start-run and typing shutdown -a


shutdown -t 300 -s -f -c shutdown_time

The shutdown command above will tell the computer the command, -t 300 is 300 seconds (could be changed to 900, etc).  The -s is to shutdown, -f is to force any running applications to close, -c is to comment the "shutdown_time"



Or you can shut them down on your end by typing in

shutdown -m \\computername -t 300 -s -f -c shutdown_time

You could create a batch file for each computer or create one batch file with all computers to run on domain controller or server ran with administrative rights.
0
 

Author Comment

by:AZZA-KHAMEES
ID: 16541761
thanks all for your efforts, i found this freetool " http://www.beyondlogic.org/solutions/shutdown/shutdown.htm " i tested it, it creates a scheduled task in the user machine and runs it then delete it . it was cool but the problem was if this senario appears, if the user logged in, policy was applied, scheduled task was created, then the user shuts down his PC before the job runs!!! when he logs in the next day and the policy creates the new scheduled job it will not run cause thier will be 2 scheduled tasks (i found out this conclusion after testing)

does anyone knows how to delete the scheduled task when the computer shutsdown???

thanks
0
 
LVL 15

Accepted Solution

by:
Naser Gabaj earned 1500 total points
ID: 16673870
AZZA-KHAMEES

Read this assisted answer from "jhautani"

I think it's much likely fit your need:

http://www.experts-exchange.com/Operating_Systems/Windows_Server_2003/Q_21068118.html#11617292 

Good luck.

Naser
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question