+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
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
    698
    Blog Entries
    2
    Thank Post
    98
    Thanked 94 Times in 82 Posts
    Rep Power
    46
    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. IDG Tech News

  3. #17
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    703
    Thank Post
    52
    Thanked 24 Times in 11 Posts
    Rep Power
    19
    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

  4. #18

    Join Date
    Feb 2011
    Posts
    52
    Thank Post
    3
    Thanked 10 Times in 7 Posts
    Rep Power
    4

  5. #19

    Join Date
    May 2010
    Posts
    200
    Thank Post
    21
    Thanked 10 Times in 7 Posts
    Rep Power
    6
    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

  6. #20

    DaveP's Avatar
    Join Date
    Oct 2006
    Location
    Can't talk now: The mother-ship is calling!
    Posts
    5,000
    Blog Entries
    1
    Thank Post
    199
    Thanked 744 Times in 478 Posts
    Rep Power
    559
    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.

  7. #21
    basicchannel's Avatar
    Join Date
    May 2010
    Location
    Norfolk, UK
    Posts
    145
    Blog Entries
    1
    Thank Post
    19
    Thanked 11 Times in 8 Posts
    Rep Power
    6
    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)

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

Similar Threads

  1. Replies: 16
    Last Post: 15th May 2011, 09:55 PM
  2. School ICT policy
    By catbert in forum School ICT Policies
    Replies: 16
    Last Post: 28th May 2006, 10:52 PM
  3. Replies: 18
    Last Post: 14th October 2005, 09:28 AM
  4. Group Policy Settings Examples
    By mattpant in forum Networks
    Replies: 20
    Last Post: 17th September 2005, 11:12 PM
  5. Scottish ICT Policies
    By RobC in forum School ICT Policies
    Replies: 4
    Last Post: 20th June 2005, 10: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
  •