Jump to content

Recommended Posts

Posted

My plan

 

Push out a scheduled task using GPP that will do the following on Win 7 clients

 

Action = C:\windows\system32\Shutdown -s -f -t 60 -c "Powering off machine. Please press cancel now to abort."

Conditions = Start the task only if the computer is idle for 25minutes

Wait for idle for 5 minutes

 

This seems far too easy ( I guess I’ve had one of those weeks where nothing seems easy ;) )

Am I right in thinking this scheduled task will only start the shutdown process if the computer has been idle for 30 minutes? And then the user will be prompted with my message and have the option to abort the shutdown. Also if the computer was idle for say 20 minutes and then a user started using the computer for a lesson, but then logged off at the end the condition rule would run again?

Of course the easiest way is to test it :) It's Friday through! And I’m about to go out for a meal.

 

Please tell me my idea is this easy to implement =]

(Also feel free to say how you handle shutting down the school computers)

 

Thanks and have a lovely weekend

Posted

Ok, it doesn’t work.

For testing I shortened the time down to 2 minutes, so after two minutes of being idle I was supposed to be prompted with the shutdown message, but it never prompted me or shutdown the computer. If I force the task it runs fine (Apart from I don’t get an option to abort the shutdown )

If stuff is running in the background will this prevent the computer being seen as idle? On my test I had IE open only and I didn’t touch the computer and thought that would be classed as idle.

 

Might need to find another way of doing this=]

Posted
There is a script floating around on the Microsoft script guys site about if the keyboard or mouse hasnt been touched in 20 minutes it will prompt a shutdown if logged in, and will shutdown if left at log on screen.

 

whats this website?

It may work for what I need. How do you handle shutting down of the computers?

Posted

I do something similar, except that it is a scheduled task running from one of the servers to shutdown all the computers at a specific time each day using psshutdown.

 

psshutdown.exe -t 300 -c -m "{insert your message here}." -n 5 \\{computername}

 

This wil prompt the users that the computer will shutdown in 5mins, and they have the option to cancel in case they are working (late etc).

The 5, if i remember is the wait time to find the remote computer, since i've a command line for each computer, the scheduled task would take hours trying a computer that isnt even switched on.

 

You could modify for your own requirements.

 

You can use PsShutdown to initiate a shutdown of the local or a remote computer, logoff a user, lock a system, or to abort an imminent shutdown.

 

Usage: psshutdown [[\\computer[,computer[,..] | @file [-u user [-p psswd]]] -s|-r|-h|-d|-k|-a|-l|-o [-f] [-c] [-t nn|h:m] [-n s] [-v nn] [-e [u|p]:xx:yy] [-m "message"]

 

Displays the supported options.

 

computer

 

Perform the command on the remote computer or computers specified. If you omit the computer name the command runs on the local system, and if you specify a wildcard (\\*), the command runs on all computers in the current domain.

 

@file

Run the command on each computer listed in the text file specified.

 

-u

Specifies optional user name for login to remote computer.

 

-p

Specifies optional password for user name. If you omit this you will be prompted to enter a hidden password.

 

-a

Aborts a shutdown (only possible while a countdown is in progress).

 

-c

Allows the shutdown to be aborted by the interactive user.

 

-d

Suspend the computer.

 

-e

Shutdown reason code.

Specify 'u' for user reason codes and 'p' for planned shutdown reason codes.

xx is the major reason code (must be less than 256).

yy is the minor reason code (must be less than 65536).

 

-f

Forces all running applications to exit during the shutdown instead of giving them a chance to gracefully save their data.

 

-h

Hibernate the computer.

 

-k

Poweroff the computer (reboot if poweroff is not supported).

 

-l

Lock the computer

 

-m

This option lets you specify a message to display to logged-on users when a shutdown countdown commences.

 

-n

Specifies timeout in seconds connecting to remote computers.

 

-o

Logoff the console user.

 

-r

Reboot after shutdown.

 

-s

Shutdown without power off.

 

-t

Specifies the countdown in seconds until the shutdown (default: 20 seconds) or the time of shutdown (in 24 hour notation).

 

-v

Display message for the specified number of seconds before the shutdown. If you omit this parameter the shutdown notification dialog displays and specifying a value of 0 results in no dialog.

 

PsShutdown

Posted
I do something similar, except that it is a scheduled task running from one of the servers to shutdown all the computers at a specific time each day using psshutdown.

 

psshutdown.exe -t 300 -c -m "{insert your message here}." -n 5 \\{computername}

 

This wil prompt the users that the computer will shutdown in 5mins, and they have the option to cancel in case they are working (late etc).

The 5, if i remember is the wait time to find the remote computer, since i've a command line for each computer, the scheduled task would take hours trying a computer that isnt even switched on.

 

You could modify for your own requirements.

 

This would work...but I was hoping to have it setup so the computer shuts down if idle for X amount of minutes. I guess getting a setup like that isn’t as simple as I thought?

The way you mentioned. Is there an easy way to pull all the computer names out of AD from a specific OU? Just makes it easier to manage.

Posted

I use shutdownertron which works very well on both XP and Win 7 machines:

EduGeek Shutdownertron

 

Someone somewhere told me that you could modify it to work if the computer was idle for so long but I am not sure who it was - maybe you could work it out?

Posted

Use shutdownertron, I cant get the scheduled task to do it.

 

The task runs, declares itsself complete but no shutdown is triggered.

 

BoX

Posted

shutdownertron does look good and easy to manage, however there seems to be quite a few features missing and also the current version doesn’t fully support windows 7. Might use when the 1.5 version is released.

I'm still hoping for an idle X amount time shutdown method, but from all my searching I haven’t found much if anything on how to do it.

I've seen people mention that they use a script that checks to see if a user is logged on, then if yes don’t shutdown and retry in X minutes, if no shutdown, and then force shutdown of all computers that are still logged on at X time.

 

Anyone know where this script lives or willing to share with me:)

Posted
As I said, shutdownertron works fine for me on a predominantly Windows 7 network. I do have a policy to make sure that the computers don't go into hibernation or go to sleep, but apart from that it works brilliantly
Posted
...I do have a policy to make sure that the computers don't go into hibernation or go to sleep,...

 

Would you mind sharing that? When I tried to apply a policy to do this it killed my desktop for staff and students.

 

Thanks.

  • 1 year later...
Posted (edited)
you just need a little applet, its name is "Poweroff", you can search it or get it here:

 

Powerful customizable shutdown utility

 

Sorry - couldn't resist..

 

"The detailed timing functions of Poweroff really let a person fondle admiringly."

 

Um.. yes.. you realise this is a site for schools, right? ;)

Edited by Dos_Box
Posted

Hi

 

I have to use a combination of shutdownertron and a group policy with a scheduled task with this to run at a specific time every day.

 

"c:\windows\system32\shutdown.exe" -f -s

 

Richard

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...