+ Post New Thread
Results 1 to 15 of 15
Windows Thread, Will this shutdown schedule work? in Technical; ...
  1. #1

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    36

    Will this shutdown schedule work?

    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

  2. #2

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    36
    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=]

  3. #3

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    12,441
    Thank Post
    1,682
    Thanked 2,041 Times in 1,485 Posts
    Blog Entries
    2
    Rep Power
    461
    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.

  4. #4

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    36
    Quote Originally Posted by nephilim View Post
    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?

  5. #5

    Join Date
    Dec 2007
    Posts
    889
    Thank Post
    94
    Thanked 165 Times in 140 Posts
    Rep Power
    50
    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

  6. #6

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    36
    Quote Originally Posted by MYK-IT View Post
    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.

  7. #7

    witch's Avatar
    Join Date
    Nov 2005
    Location
    Dorset
    Posts
    11,381
    Thank Post
    1,501
    Thanked 2,585 Times in 1,799 Posts
    Rep Power
    777
    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?

  8. #8
    box_l's Avatar
    Join Date
    May 2007
    Location
    Herefordshire
    Posts
    439
    Thank Post
    79
    Thanked 95 Times in 79 Posts
    Rep Power
    63
    Use shutdownertron, I cant get the scheduled task to do it.

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

    BoX

  9. #9

    Join Date
    Jun 2010
    Location
    England
    Posts
    735
    Thank Post
    89
    Thanked 52 Times in 46 Posts
    Rep Power
    36
    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

  10. #10

    witch's Avatar
    Join Date
    Nov 2005
    Location
    Dorset
    Posts
    11,381
    Thank Post
    1,501
    Thanked 2,585 Times in 1,799 Posts
    Rep Power
    777
    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

  11. #11

    DaveP's Avatar
    Join Date
    Oct 2006
    Location
    Can't talk now: The mother-ship is calling!
    Posts
    9,263
    Thank Post
    353
    Thanked 1,335 Times in 920 Posts
    Blog Entries
    4
    Rep Power
    1189
    Quote Originally Posted by witch View Post
    ...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.

  12. #12

    witch's Avatar
    Join Date
    Nov 2005
    Location
    Dorset
    Posts
    11,381
    Thank Post
    1,501
    Thanked 2,585 Times in 1,799 Posts
    Rep Power
    777
    No problem but I will have to get it on Monday - you might have to remind me!

  13. Thanks to witch from:

    DaveP (17th September 2011)

  14. #13

    DaveP's Avatar
    Join Date
    Oct 2006
    Location
    Can't talk now: The mother-ship is calling!
    Posts
    9,263
    Thank Post
    353
    Thanked 1,335 Times in 920 Posts
    Blog Entries
    4
    Rep Power
    1189
    OK. Thanks again.

  15. #14
    Abaddon's Avatar
    Join Date
    Mar 2006
    Location
    Middlesex
    Posts
    618
    Thank Post
    72
    Thanked 70 Times in 65 Posts
    Rep Power
    61
    Quote Originally Posted by gnrsu View Post
    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?
    Last edited by Dos_Box; 31st December 2012 at 10:36 AM.

  16. #15
    ricki's Avatar
    Join Date
    Jul 2005
    Location
    uk
    Posts
    1,477
    Thank Post
    20
    Thanked 164 Times in 157 Posts
    Rep Power
    53
    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



SHARE:
+ Post New Thread

Similar Threads

  1. Will this work?
    By BenHartshorn in forum Learning Network Manager
    Replies: 12
    Last Post: 25th February 2010, 10:26 AM
  2. Will this work?
    By BishopVLE in forum Network and Classroom Management
    Replies: 6
    Last Post: 22nd January 2010, 03:05 PM
  3. Will this work?
    By RabbieBurns in forum Wireless Networks
    Replies: 10
    Last Post: 15th October 2008, 04:53 PM
  4. Will this work with this? (Server Related)
    By mrforgetful in forum Hardware
    Replies: 4
    Last Post: 14th July 2008, 11:12 AM
  5. Wireless: Will this work
    By thegrassisgreener in forum Windows
    Replies: 11
    Last Post: 30th January 2008, 02:21 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •