+ Post New Thread
Results 1 to 12 of 12
Scripts Thread, Script to shut down computers in a certain OU in Coding and Web Development; Has anyone got a script that i can run as asheduled task that will let me shut down the pC's ...
  1. #1
    tosca925's Avatar
    Join Date
    Aug 2005
    Location
    Midlands
    Posts
    1,565
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    17

    Script to shut down computers in a certain OU

    Has anyone got a script that i can run as asheduled task that will let me shut down the pC's in a certain OU.

    We want to try this on certain rooms whose staff seem to forgetfull to turn the PC's off last thing in the afternoon

  2. IDG Tech News

  3. #2

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    7,026
    Thank Post
    1,088
    Thanked 641 Times in 598 Posts
    Rep Power
    209

    Re: Script to shut down computers in a certain OU

    Take a look here :

    http://www.computerperformance.co.uk/ezine/ezine45.htm

    You would then have to figure out how to combine enumerating each computer in that specific OU ( which I am sure that same site has an example of that as well ) and combine the 2 scripts so that it doenst prompt you for a computer name

    Hope this helps.

    Other then that www.sysinternals.com have psshutdown or something like that which will do the trick with regards to shutting down, logging off or restarting remote computers.

  4. #3

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    7,026
    Thank Post
    1,088
    Thanked 641 Times in 598 Posts
    Rep Power
    209

    Re: Script to shut down computers in a certain OU

    With regards to enumerating the computers take a look at this script :

    http://www.computerperformance.co.uk/ezine/ezine27.htm

    I know it is with regards to moving them but you can delete the code out that moves the computers and that will allow you to enumerate them

  5. #4

    Join Date
    Jul 2005
    Location
    Corby
    Posts
    1,057
    Thank Post
    12
    Thanked 19 Times in 17 Posts
    Rep Power
    19

    Re: Script to shut down computers in a certain OU

    Hi.

    Use PSShutdown from Sysinternals- an excellent tool. You can find it here:

    http://www.sysinternals.com/Utilities/PsShutdown.html

    Why reinvent the wheel?

    Paul :-)

  6. #5
    mark's Avatar
    Join Date
    Jun 2005
    Location
    x-communicated
    Posts
    4,090
    Blog Entries
    2
    Thank Post
    190
    Thanked 44 Times in 40 Posts
    Rep Power
    42

    Re: Script to shut down computers in a certain OU

    Poweroff 3.0 [google it] is scriptable.

  7. #6

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    7,026
    Thank Post
    1,088
    Thanked 641 Times in 598 Posts
    Rep Power
    209

    Re: Script to shut down computers in a certain OU

    Quote Originally Posted by kingswood
    Hi.

    Use PSShutdown from Sysinternals- an excellent tool. You can find it here:

    http://www.sysinternals.com/Utilities/PsShutdown.html

    Why reinvent the wheel?

    Paul :-)
    Cos then you can make the wheel better with tyre treads that allow you to drive better in the rain without skidding or slipping

  8. #7

    Join Date
    Jul 2005
    Location
    Corby
    Posts
    1,057
    Thank Post
    12
    Thanked 19 Times in 17 Posts
    Rep Power
    19

    Re: Script to shut down computers in a certain OU

    OK.

    But that's an existential argument only. In reality Network Managers have so little time to go around reinventing "better wheels...with tyre treads that allow you to drive better in the rain without skidding or slipping" that using wheels already in existence PROVEN TO WORK can mean the difference between productive use of time and a complete waste of time.

    How long would it take you to "reinvent" this wheel then? A week? In the meantime I just download the one that works and get the thing done.

    For everyone else: I have been using a veritable book of proverbial wheels for my reading material this last week- "Windows 2003 Server Cookbook", and would highly recommend the material to you all.

    Paul

  9. #8

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    7,026
    Thank Post
    1,088
    Thanked 641 Times in 598 Posts
    Rep Power
    209

    Re: Script to shut down computers in a certain OU

    I know I just was being facetious after the day we had

    As for the book you are recomending , I didnt really get a chance to look at it but I have enough to read with the book I am borrowing from you now, I will carry on reading it tommorow.

    I do agree with psshutdown though ! Otherwise I wouldnt of mentioned it in my post above :P

  10. #9
    Netman's Avatar
    Join Date
    Jul 2005
    Location
    Bournemouth
    Posts
    744
    Thank Post
    229
    Thanked 112 Times in 80 Posts
    Rep Power
    37

    Re: Script to shut down computers in a certain OU

    shutdown -s -m \\ictsuite01 -f
    shutdown -s -m \\ictsuite02 -f
    shutdown -s -m \\ictsuite03 -f
    shutdown -s -m \\ictsuite04 -f

    etc etc.

    Save these as a batch file *.bat
    Set up a scheduled task on your management workstation to run it at whatever time you require...

  11. #10

    GrumbleDook's Avatar
    Join Date
    Jul 2005
    Location
    Kettering, Northants
    Posts
    9,488
    Blog Entries
    18
    Thank Post
    929
    Thanked 1,425 Times in 912 Posts
    Rep Power
    470

    Re: Script to shut down computers in a certain OU

    Quote Originally Posted by kingswood
    OK.

    But that's an existential argument only. In reality Network Managers have so little time to go around reinventing "better wheels...with tyre treads that allow you to drive better in the rain without skidding or slipping" that using wheels already in existence PROVEN TO WORK can mean the difference between productive use of time and a complete waste of time.

    How long would it take you to "reinvent" this wheel then? A week? In the meantime I just download the one that works and get the thing done.

    For everyone else: I have been using a veritable book of proverbial wheels for my reading material this last week- "Windows 2003 Server Cookbook", and would highly recommend the material to you all.

    Paul
    I have always considered that 50% of a Techie's time is taken up with actually work. The other 50% is split, in varying proportions depending on the level in others sticking their nose in, into

    a) trying to work out why x didn't work.
    b) trying to work out how to make sure x works next time, preferably with less time/money/brain power.
    c) trying to work out how to stop others giving more jobs similar to x when x is actually the best thing for the job.

    There are a few other things ... catching up on your favourite comic strip (UF, Kevin and Kell, Garfield, etc) ... trying to find a new place to hide so you can actually work undisturbed for an hour ... you know the sort ot things.

    And let us not forget ... the wheel is overated ... mere mortals use wheels on cars ... we are gods ... we should be levitating.

  12. #11

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    7,026
    Thank Post
    1,088
    Thanked 641 Times in 598 Posts
    Rep Power
    209

    Re: Script to shut down computers in a certain OU

    We dont levitate, we fly ......

    Around the dammed building to fix problems !! LOL

  13. #12
    mark's Avatar
    Join Date
    Jun 2005
    Location
    x-communicated
    Posts
    4,090
    Blog Entries
    2
    Thank Post
    190
    Thanked 44 Times in 40 Posts
    Rep Power
    42

    Re: Script to shut down computers in a certain OU

    Poweroff 3 - Vorsprung Durk Technic!

SHARE:
+ Post New Thread

Similar Threads

  1. Software to shut down PC's?
    By sidewinder in forum Windows
    Replies: 82
    Last Post: 20th February 2008, 10:40 AM
  2. UPS Won't Shut Up.
    By Greg_Jones in forum Hardware
    Replies: 12
    Last Post: 27th November 2007, 10:21 AM
  3. Shutdown batch script stalls if 1 PC is shut down
    By PrimaryTech in forum Scripts
    Replies: 8
    Last Post: 7th July 2007, 06:04 PM
  4. VBS script for prestaging computers anyone?
    By ChrisH in forum Scripts
    Replies: 7
    Last Post: 23rd June 2006, 09:59 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
  •