Jump to content

Script to shut down computers in a certain OU


Recommended Posts

Posted

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

Posted

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 http://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.

Posted

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

Posted

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

Posted

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...