Sorry guys I forgot to check back to answer all your questions, I rarely venture into this part of the forum
The only reason I would see doing the script would be to see which computers are left on at night as judging by your AD name it looks like a school
![Big Grin :D :D](/styles/default/xenforo/vbSmilies/Normal/biggrin.gif)
.
We have a script to turn off all computers so there is never a need to do this anyway.
Still not making much sense why you want to do this.
If a computer is in a bin! You should know about it, hopefully users aren't just binning laptops!
If a user is off on 2+ weeks holiday your task will assume they are dead!
If its to do with DHCP addresses, just set a shorter lease.
In our cupboard there are 3 broken dell laptops which I immediately replaced with any old computer to ensure that the teachers could still have a computer on their desk; unfortunately I forgot to remove these computers from AD until now.
Ok, because I work in a school and all these laptops are required for the teacher to teach a lesson each and every laptop
will have been turned on in the last 7days.
If a computer has not been turned on in 1 week it loses an IP address (these computers will be the ones in the cupboard) if a computer is off, it will still have an IP address but not reply when it is pinged giving a different message, and computers that are on will obviously reply when pinged.
So there are 3 different replies a PC can give:
- Computer replys and is therefore turned on
- Computer doesn't reply but still has IP address
- Computer doesn't reply and has no IP address (these are computers that are broken)
This means I can identify the names of the computers in the cupboard (The ones that don't reply and don't have an IP address) and delete them from AD.
I managed to do exactly what I wanted to do perfectly.
Edit: I know it works because I know how many dell laptops we have and how many in the cupboard are broken so if something was wrong I could obviously tell.
Does that now make sense?
Oh and one of you is a husband to a teacher here? She said something about this thread so hello to you
![Stick Out Tongue :p :p](/styles/default/xenforo/vbSmilies/Normal/tongue.gif)