what time do you shut them down?
I have a scheduled script that does ours at 4pm but takes note of anyone logged in, doesnt shut them down and then a later scheduled script takes care of those ones.
9pm as we have adult classes most nights.
I will amend the script so that it process the parent and children OUs.
Someone else has also asked if I can add a section to skip OUs as well computers.
A few people have mentioned freeware or commercial alternatives.
The script is totally free and open for anyone to use and change. So has an advantage over freeware, also does not need a client. It forcefully throws people off to prevent them being logged in and leaving equipment on over night, part of an eco drive at our school!
The warning time can be changed, or individual computers can be left out of the shutdown scheme.
I have added the following to the script I posted yesterday to process computers in the parent OU, before going on to process child OUs and computers.
'Process computers in first level of OU.
objParent.Filter = Array("computer")
Hopefully that should work for you now.
PS a couple of people asked about where this should be run from. We run it from a server as a scheduled task, that runs all our scheduled tasks and monitoring tasks. But it can be run from any PC or server that has admin access to the PCs, that you are wanting to shutdown.
Last edited by monkeyx; 27th March 2009 at 09:25 AM.
Cheers for the script monkeyx
Will it shutdown machines that are locked? As our current psshutdown seems to struggle with locked machines.
Thanks for trying but I don't have any PC's in the parent OU my Ou structure is like this:I have added the following to the script I posted yesterday to process computers in the parent OU, before going on to process child OUs and computers.
The parent in relation to the script starting OU, not parent in the domain?
Did you try the new script?
jsnetman (27th March 2009)
yeah it's working a treat. Thanks very muchDid you try the new script?
monkeyx (27th March 2009)
In theory could also shutdown ising WMI to force issue, but not sure if this would be more reliable?
This script is a proof of concept for a c# application that will add extra functionality etc to force and monitor shutdown success.
Your method is nice too!
I calculated that it's saving the school well over £10,000/year versus the laissez-faire approach.
Tested Monkeyx's VB script on all curriculum machines as I left school tonight, it did it's job. I used to use another VB script to shutdown the machines at a scheduled time but this relied upon an updated list of machines on the network, thanks to this sript thats no longer necessary.
Can anyone give any pointers as to how I might exclude an entire sub OU from being shutdown? Have a lot of computers in the OU I wish to exclude and I'd rather not have to maintain a list again!
There are currently 1 users browsing this thread. (0 members and 1 guests)