• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7130
  • Last Modified:

Force Shutdown Workstations After Office Hours Using GPO

We have a Win2k3 DC and Win2K and WinXP workstations. After office hours, our employees tend to leave their workstations open.

I am able to use the default domain policy to force logoff users after office hours.  Is there a way to use the GPO or maybe a script that I could use to force shutdown (not logoff) a workstation after office hours?
0
densho
Asked:
densho
  • 4
  • 3
  • 3
  • +2
1 Solution
 
dhoffman_98Commented:
You can create a scheduled task that executes at a given time on the workstations and calls the following command:

shutdown -s -f -t 0
0
 
Brian PiercePhotographerCommented:
You can schedue a task that will shut the machines down along the lines of

shutdown -s -f -m \\Computer1 -t 60
shutdown -s -f -m \\Computer2 -t 60
shutdown -s -f -m \\Computer3 -t 60
shutdown -s -f -m \\Computer4 -t 60

(fir the syntax of shutdown see http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/shutdown.mspx?mfr=true

If you want ot get really clever, you can store the list of comuters to be shutdown in a text file and execute a script that will read the list and shut each one down in turn - see
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_22672430.html?sfQueryTermInfo=1+file+machin+shutdown#a19422499
0
 
Brian PiercePhotographerCommented:
Opps the gremlins got in again - corrected version:-

You can schedue a task that will shut the machines down. The scheduled task can consist of a series of commands in a batch file along the lines of

shutdown -s -f -m \\Computer1 -t 60
shutdown -s -f -m \\Computer2 -t 60
shutdown -s -f -m \\Computer3 -t 60
shutdown -s -f -m \\Computer4 -t 60
....
(for the syntax of shutdown see http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/shutdown.mspx?mfr=true)

If you want to get really clever, you can store the list of computers to be shutdown in a text file and execute a script that will read the list and shut each computer down in turn - see
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_22672430.html?sfQueryTermInfo=1+file+machin+shutdown#a19422499
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
denshoAuthor Commented:
When i type in, for example:

> shutdown -s -f -m \\cad-63

from command prompt, i get this result:

> CAD-63: The entered computer name is not valid. Check the name and then try again or contact your system administrator. (53)

Any idea why this happens? CAD-63 is a valid object in our AD.
0
 
dhoffman_98Commented:
Can you ping it with that name? What about doing "net view cad-63"?

If those don't work then you have a resolution problem because it's either not in DNS or WINS, or if it is in DNS, perhaps the domain search suffix on your machine is set wrong.
0
 
denshoAuthor Commented:
ping and net view only works with the windows servers and windows 2000 professional workstations. i was also even to execute the Shutdown command on them.

unfortunately, i was not able to do the same on windows xp professional workstations. any idea why?
0
 
dhoffman_98Commented:
Ping and net view should also work with the XP machines... IF YOUR FIREWALLS ARE NOT BLOCKING. Are they by any chance running XP SP2 with the firewalls on? If so, then you'll have to configure the firewalls properly to allow the commands to get through.
0
 
Brian PiercePhotographerCommented:
It must be a firewall issue as dhoffman_98 describes.
0
 
denshoAuthor Commented:
got it.

it's a firewall issue. file and print sharing should be enabled under the exeptions tab.

there are about 50+ workstations in our office, is there a way to configure the firewall by script or group policy so i don't have to individually configure it?
0
 
dhoffman_98Commented:
You can create a group policy to configure the firewall and deploy that policy to the workstations.
0
 
SunshineVKCommented:
If you are looking for powersaving, maybe you can use the EZ GPO tool. This is fully configurable and deployable using group policy

 http://www.terranovum.com/projects/energystar/ez_gpo.html
0
 
Eric BrunningCommented:
When you create a Scheduled Task through the wizard do you select Command Prompt as the Application and then edit it's properties when the task is created?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 4
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now