+ 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,547
    Thank Post
    4
    Thanked 4 Times in 4 Posts
    Rep Power
    22

    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. #2

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,807
    Thank Post
    3,320
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    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.

  3. #3

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,807
    Thank Post
    3,320
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    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

  4. #4

    Join Date
    Jul 2005
    Location
    Corby
    Posts
    1,056
    Thank Post
    12
    Thanked 20 Times in 18 Posts
    Rep Power
    24

    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 :-)

  5. #5
    mark's Avatar
    Join Date
    Jun 2005
    Posts
    3,966
    Thank Post
    248
    Thanked 49 Times in 45 Posts
    Blog Entries
    2
    Rep Power
    46

    Re: Script to shut down computers in a certain OU

    Poweroff 3.0 [google it] is scriptable.

  6. #6

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,807
    Thank Post
    3,320
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    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

  7. #7

    Join Date
    Jul 2005
    Location
    Corby
    Posts
    1,056
    Thank Post
    12
    Thanked 20 Times in 18 Posts
    Rep Power
    24

    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

  8. #8

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,807
    Thank Post
    3,320
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    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

  9. #9
    Netman's Avatar
    Join Date
    Jul 2005
    Location
    56.343515, -2.804118
    Posts
    911
    Thank Post
    367
    Thanked 190 Times in 143 Posts
    Rep Power
    54

    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...

  10. #10

    GrumbleDook's Avatar
    Join Date
    Jul 2005
    Location
    Gosport, Hampshire
    Posts
    9,950
    Thank Post
    1,345
    Thanked 1,799 Times in 1,117 Posts
    Blog Entries
    19
    Rep Power
    597

    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.

  11. #11

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,807
    Thank Post
    3,320
    Thanked 1,056 Times in 977 Posts
    Rep Power
    365

    Re: Script to shut down computers in a certain OU

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

    Around the dammed building to fix problems !! LOL

  12. #12
    mark's Avatar
    Join Date
    Jun 2005
    Posts
    3,966
    Thank Post
    248
    Thanked 49 Times in 45 Posts
    Blog Entries
    2
    Rep Power
    46

    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: 122
    Last Post: 24th March 2014, 09:58 PM
  2. UPS Won't Shut Up.
    By Greg_Jones in forum Hardware
    Replies: 12
    Last Post: 27th November 2007, 09: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
  •