[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Force Shutdown Workstations After Office Hours Using GPO

Posted on 2007-08-05
12
Medium Priority
?
7,086 Views
Last Modified: 2011-12-13
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
Comment
Question by:densho
  • 4
  • 3
  • 3
  • +2
12 Comments
 
LVL 13

Expert Comment

by:dhoffman_98
ID: 19634011
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
 
LVL 70

Expert Comment

by:KCTS
ID: 19634665
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
 
LVL 70

Accepted Solution

by:
KCTS earned 1500 total points
ID: 19634673
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:densho
ID: 19660920
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
 
LVL 13

Expert Comment

by:dhoffman_98
ID: 19666167
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
 

Author Comment

by:densho
ID: 19682409
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
 
LVL 13

Expert Comment

by:dhoffman_98
ID: 19688219
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
 
LVL 70

Expert Comment

by:KCTS
ID: 19688253
It must be a firewall issue as dhoffman_98 describes.
0
 

Author Comment

by:densho
ID: 19689414
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
 
LVL 13

Expert Comment

by:dhoffman_98
ID: 19696068
You can create a group policy to configure the firewall and deploy that policy to the workstations.
0
 
LVL 4

Expert Comment

by:SunshineVK
ID: 19728420
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
 

Expert Comment

by:Eric Brunning
ID: 37282301
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

Featured Post

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!

Question has a verified solution.

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

A hard and fast method for reducing Active Directory Administrators members.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

834 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