I’ve posted an updated version of this script in a new section of my blog. Because all the comments below relate to the original version of the script I’m going to leave that version posted here. You can find the new version of the script here.
I wrote a script to get the last time each computer logged into the domain.
This script is very similar to my script that gets user last logon times, which you can find here.
This script requires the Quest AD Cmdlets, which you can download here. (Check the box agreeing to the terms to see the download options.)