1 2 Previous Next 21 Replies Latest reply on Apr 26, 2012 11:45 AM by tonyjameshart

    How to schedule a reboot of a group of computers

    Rookie

      There are a few users that are not rebooting their computers and we would like every computer to be rebooted nightly or at least once a week for security reasons and Windows Updates. Is that a way to schedule a reboot at 2 in the morning.  Thanks, Karl.

        • 1. Re: How to schedule a reboot of a group of computers
          Apprentice

          If they are windows machine, You can create a script taht in it use the windows command "shutdown", so you have to create a "distribution package" and at the end you can release the ditribution package with a schedule task where you have to indicate the time, day ect... repeat option...

           

          Bye,

          Diego

          • 2. Re: How to schedule a reboot of a group of computers
            Rookie

            Thanks diego for your reply.  I'm creating a script and I can't get 'shutdown.exe' to work.  I went to a Windows' machine and run 'c:\windows\system32\shutdown.exe' and nothing happens.  I tried to run it from the 'run' menu and Windows' Explorer.  Is there a switch that needed to be turned on, ie. remote and/or need to be logged in as a local admin.  I was logged in as a domain admin.  Thanks for your help.

            • 3. Re: How to schedule a reboot of a group of computers
              Apprentice

              You open "run" and type "cmd", at the prompt you type "shutdown /?", the commnand show you the option, for Xp the command is simple "shutdown -f -r", for windows 2003 server (shutdown /r /f /d p:04:01 /c "Restart" ), what type of windows system vave you ?

               

              bye

              • 4. Re: How to schedule a reboot of a group of computers
                Rookie

                That worked, now I need to figure out what is wrong with my script.  Thanks for your help.  

                • 5. Re: How to schedule a reboot of a group of computers
                  mrspike SSMMVPGroup

                  Another way to do it is to go to the Patch tool, click the drop down on the "Calendar / Clock" looking icon to schedule a task, an option there is a reboot task.

                  • 7. Re: How to schedule a reboot of a group of computers
                    Frank Wils ITSMMVPGroup

                    Or use Power Management to not only schedule periodic shutdowns but also other powersettings and, when active, configure WakeUp's.

                     

                    Frank

                    Axle-IT

                    • 8. Re: How to schedule a reboot of a group of computers
                      zman Master

                      As you can see there are many ways to handle this request. You could also use a local scheduled task (LST) to reboot the computers. this would give you a lot of scheduling options and would remove load off the core (there would only be one job to deploy the LST), you can query for the LST in the console, create a custom vulnerability for it, etc.... The LST could call anything a custom vb/autoit script, vulscan as James' indicated (here is how to customize it http://community.landesk.com/support/docs/DOC-17969) this gives you the most gui options for the user. If me I would choose a LST calling vulscan to reboot with a custom agent behavior with your UI settings. I our environment we can't just simply reboot, we have to provide ample warnings and deferral time which is reflected in my shameless ER plug in my tagliine (actually reviewing this I removed it since I think they are working on this.http://community.landesk.com/support/ideas/1567 ).

                       

                      So I have a question for everyone. One thing I hear a lot about how to do thing is LANDesk, especially from new users, is that LDMS is confusing since there are so many different ways to do a task. Experienced users seem to embrace the flexibility of options, however, new users want a simple clink here and grunt type solution.

                       

                      What are your thoughts?

                       

                       

                      _____________________________________________________________
                      Please consider voting for these ERs:
                      Provide Better Pre/Post LDMS Patch/Sp/.0 Information To The Community
                      Cumulative Patch List for LANDesk Products
                      Query Builder Import
                      Provide bulk client deletions without carpal tunnel syndrome.
                      Core Synchronization Allow Mirror functionality from Master Core
                      • 9. Re: How to schedule a reboot of a group of computers
                        Frank Wils ITSMMVPGroup

                        Zman,

                         

                        very good question, maybe worth a seperate thread to make people see it?

                         

                        Anyway, IMHO, options are good, but there should also be a simple way. An interface like UDD for example, simple clean interface with the basic options, anf if you want/need more, click 'More' and get more. I also think for simplicity's sake, consistency throught the console is very important. Wherever you choose Reboot (in this example) get the same interface and the same options .

                         

                        Frank

                        Axle-IT

                        • 10. Re: How to schedule a reboot of a group of computers
                          zman Master

                          Exactly my thoughts, and not to get off track here, but consistency in how all functions/actions are completed. Distribution is distribution, no matter if you are distributing a patch, software, image, dat files, etc.. there should be a consistent way of completing a distribution task.  A consistent, clean, descriptive, clear, UI. One day.......

                          • 11. Re: How to schedule a reboot of a group of computers
                            Rookie

                            Thanks for the many suggestions, ideas and help.  I can schedule a reboot for a group of computers.

                             

                            Now, is there a way to create a report/query that tells me the date/time of the last reboot per machine.  To make sure the command worked at 1am.  Thanks again.

                            • 12. Re: How to schedule a reboot of a group of computers
                              Frank Wils ITSMMVPGroup

                              In the Inventory, under OS is a Last started date/time. You could use that.

                               

                              Frank

                              Axle-IT

                              • 14. Re: How to schedule a reboot of a group of computers
                                Apprentice

                                I use the following method with the following bach file :

                                 

                                (reboot-PC-2330.bat)

                                @echo off
                                Echo ce pc sera deconnecte A 23h30 minutes par l'administrateur systeme.

                                Echo This computer will restart at 23h30 By the system administrator
                                at 23:30 Shutdown -r -f -m \\127.0.0.1

                                (End reboot-PC-2330.bat)

                                 

                                I  can launch it when i want It always and only restart the computer a  23:30 because my Landesk packages create in a local task in the local  scheduler of the computer to do the reboot.

                                 

                                I  restart all the computers of my network like that in a single task. And  there is no risk because if the Landesk task failed end if it still  locally scheduled by Landesk agent, it will launch it later but the  action of the Landesk package is only to create a locally scheduled  reboot at 23h30. So even if the task failed and start tomorow morning,  the computer willrestart tomorow at 23:30... So no problem for the  computer's users...

                                 

                                Some time I would like to see all the society's computers restart exactly at the same time... lol
                                What do you think about it?

                                 

                                If you want to scheduled this task once a week use the operator /EVERY:

                                See the help for at command : at /?

                                The AT command schedules commands and programs to run on a computer at

                                a specified time and date. The Schedule service must be running to use

                                the AT command.

                                 

                                AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]

                                AT [\\computername] time [/INTERACTIVE]

                                    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

                                 

                                \\computername     Specifies a remote computer. Commands are scheduled on the

                                                   local computer if this parameter is omitted.

                                id                 Is an identification number assigned to a scheduled

                                                   command.

                                /delete            Cancels a scheduled command. If id is omitted, all the

                                                   scheduled commands on the computer are canceled.

                                /yes               Used with cancel all jobs command when no further

                                                   confirmation is desired.

                                time               Specifies the time when command is to run.

                                /interactive       Allows the job to interact with the desktop of the user

                                                   who is logged on at the time the job runs.

                                /every:date[,...]  Runs the command on each specified day(s) of the week or

                                                   month. If date is omitted, the current day of the month

                                                   is assumed.

                                /next:date[,...]   Runs the specified command on the next occurrence of the

                                                   day (for example, next Thursday).  If date is omitted, the

                                                   current day of the month is assumed.

                                "command"          Is the Windows NT command, or batch program to be run.

                                Try this :

                                C:\>at \\127.0.0.1 23:30 /EVERY:Monday "command"

                                 

                                I Hope it helps you.

                                1 2 Previous Next