+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
Windows 7 Thread, Shutdown Policy in Technical; Shutdown has a number of switches: -r (Restart) -t xx (Shutdown in xx seconds) -f (Force, Do not allow user ...
  1. #16
    Mr.Ben's Avatar
    Join Date
    Jan 2008
    Location
    A Pirate Ship
    Posts
    942
    Thank Post
    182
    Thanked 158 Times in 126 Posts
    Blog Entries
    2
    Rep Power
    65
    Shutdown has a number of switches:

    -r (Restart)
    -t xx (Shutdown in xx seconds)
    -f (Force, Do not allow user to cancel and end all programs)
    -m \\Machine_name (remote shutdown a specific machine)

    or, RTFM if you can't remember them!

    Edit: Beaten to it!

  2. #17
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,343
    Thank Post
    85
    Thanked 47 Times in 33 Posts
    Rep Power
    31
    Quote Originally Posted by cscott View Post
    Instead of shutting them down why not use a combination of sleep & hibernate?

    We've got all our PC's set to enter sleep mode after 20 minutes of inactivity and then to hibernate after a further 20 minutes of inactivity - once they enter sleep mode they are using very very little power and hibernate is as good as being off.

    This way you get power savings during the day (i.e. free periods, lunch etc...) the machines take much less time to resume then they do to cold boot, the machines can wake themselves up from hibernation to install windows updates overnight and you can manage it all via Group Policy - no need for 3rd party software
    I agree

  3. #18

    Join Date
    Feb 2011
    Posts
    92
    Thank Post
    6
    Thanked 24 Times in 15 Posts
    Rep Power
    12

  4. #19

    Join Date
    May 2010
    Posts
    1,155
    Thank Post
    113
    Thanked 104 Times in 79 Posts
    Rep Power
    52
    Not sure where I got this from but it works most of the time

    library.vbs - set this to run on a scheduled task, we have different areas to switch off at different times - this is the library one.
    user / password is domain admin usually - thats what I use


    Code:
    On Error Resume Next
    
    Dim oFSO, oTS, sClient, oWindows, oLocator, oConnection, oSys
    Dim sUser, sPassword
    
    'set remote credentials
    sUser = ""
    sPassword = ""
    
    'open list of client names
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oTS = oFSO.OpenTextFile("C:\Shutdown\library.txt")
    
    Do Until oTS.AtEndOfStream
     
     'get next client name 
     sClient = oTS.ReadLine
    
     'get WMI locator
     Set oLocator = CreateObject("WbemScripting.SWbemLocator")
    
     'Connect to remote WMI
     Set oConnection = oLocator.ConnectServer(sClient, _
       "root\cimv2", sUser, sPassword)
    
      'issue shutdown to OS
     ' 4 = force logoff
     ' 5 = force shutdown
     ' 6 = force rebooot 
     ' 12 = force power off
     Set oWindows = oConnection.ExecQuery("Select " & _
       "Name From Win32_OperatingSystem")
     For Each oSys In oWindows
       oSys.Win32ShutDown(5)
     Next 
    
    Loop
    
    'close the text file
    oTS.Close
    'WScript.Echo "All done!"

    Then you list the machines in a text file (in this case c:\shutdown\library.txt)
    This way you can easily omit machines etc..

    save this as library.txt

    Code:
    SNR-library-1
    SNR-library-2
    SNR-library-3
    SNR-library-7
    SNR-library-8
    SNR-library-9

  5. #20

    DaveP's Avatar
    Join Date
    Oct 2006
    Location
    Can't talk now: The mother-ship is calling!
    Posts
    9,241
    Thank Post
    353
    Thanked 1,331 Times in 916 Posts
    Blog Entries
    4
    Rep Power
    1188
    For those still looking for an answer to this [who have found answers suggested here unsatisfactory] I found this today:

    Link 1: Dimio's Tools [Scroll down to DShutdown]

    DShutdown is a stand-alone program that allows you to easily shutdown and wake up local or remote PCs, with many specific options.

    DShutdown supports more than just standard shutdown options, there are options relating to "pure" shutdown (such as the "force after wait" option which causes a forced, but 'clear' shutdown). There are monitoring options that allow you to shutdown a PC after a particular application terminates (useful at the end of compressing several files). There are also options to shutdown a PC when Internet traffic reduces below a particular data-rate (useful to shutdown a PC when it has finished a large download).

    It is also possible to intercept a shutdown request, initiated by the user or an application, and to then execute the shutdown request with selected options from DShutdown. (For example: to simultaneously shut down all Lan PCs when the server shuts down).

    DShutdown doesn't force a power-off without logging off and saving settings. DShutdown instead provides a means to log-off, shutdown and safely power-off your PC. Administrators who use roaming profiles will appreciate the benefits of this feature.


    I have not experimented with this myself [as Shutdownertron works well enough for us here]

    Link 2: How to shutdown remote PCs

    HTH.

  6. #21
    basicchannel's Avatar
    Join Date
    May 2010
    Location
    Norfolk, UK
    Posts
    279
    Thank Post
    36
    Thanked 23 Times in 15 Posts
    Blog Entries
    1
    Rep Power
    24
    Has anyone had any problems with Shutdownertron executing at completely the wrong time on just a single workstation? I've got one workstation where the event logs are telling me Shutdownertron was executed at 09:30 this morning. Inside the log it states the correct hour/minute etc as 18:00.

    Another time it was shutting down at 16:30 (same computer)

  7. #22

    Join Date
    Apr 2010
    Posts
    2,152
    Thank Post
    105
    Thanked 190 Times in 157 Posts
    Rep Power
    84
    I give a vote for using a Group Policy Preference to set a scheduled shutdown task.

    I do that here at 7PM, 9PM and 10PM (Giving 30 minutes notice of the shutdown). I've also put a shortcut to cancel the shutdown on the desktop of staff members.
    Just out of interest what code is used to cancel the shutdown.

  8. #23

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,762
    Thank Post
    354
    Thanked 533 Times in 498 Posts
    Rep Power
    182
    Quote Originally Posted by edutech4schools View Post
    Just out of interest what code is used to cancel the shutdown.
    Code:
    shutdown -a
    cancel's a timer based shutdown. So assuming some script that lets that run (Or if done via taskmanager, guess something to cancel task)

    Steve

  9. #24

    Join Date
    Oct 2012
    Location
    UK
    Posts
    39
    Thank Post
    1
    Thanked 1 Time in 1 Post
    Rep Power
    0
    another vote for Group Policy Prefs Scheduled Task. Always works well for me

  10. #25

    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,830
    Thank Post
    219
    Thanked 271 Times in 219 Posts
    Rep Power
    69
    You can use CSE Group policy Preferences to deploy Scheduled tasks, so you can use shutdown.exe with switches. You can also tell scheduled tasks to run if a user is logged in or not and if the PC is on battery and even come out of standby to run. Very flexible.

    This is mine, it runs at 18:30 after the 17:30 wsus auto update.

    shutdown.png
    Last edited by chazzy2501; 27th November 2012 at 03:00 PM. Reason: 18:30 not 18:00



SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 16
    Last Post: 15th May 2011, 10:55 PM
  2. School ICT policy
    By catbert in forum School ICT Policies
    Replies: 16
    Last Post: 28th May 2006, 11:52 PM
  3. Replies: 18
    Last Post: 14th October 2005, 10:28 AM
  4. Group Policy Settings Examples
    By mattpant in forum Wireless Networks
    Replies: 20
    Last Post: 18th September 2005, 12:12 AM
  5. Scottish ICT Policies
    By RobC in forum School ICT Policies
    Replies: 4
    Last Post: 20th June 2005, 11:45 AM

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
  •