sbs 2003 r2 - is there an easy (or any) way to see when each computer on the domain was used last?

CanUHelpMe0
CanUHelpMe0 used Ask the Experts™
on
We have a bunch of computers listed in the client computer list of our sbs 2003 R2 box.  some are gone from the network (and any problem with deleting them from the list?) I know a couple say win 2K and those machines are certainly gone.  But some XP boxes - they have older naming criteria, before I got involved so they may be active computers.  I'd love to be able to see the last time someone logged into the network from that machine or some other way to say - yeah, it's got a date of 2009... take it off the list!

is it possible?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Systems Admin
Top Expert 2010
Commented:
Yes. Ad Manager Plus (http://www.manageengine.com/products/ad-manager/cleanup-your-active-directory.html) has the function built in. You can do so with a VBScript, and now that Powershell 2 is available for Windows 2003, you can do it with a Powershell script as well.
Adam BrownSenior Systems Admin
Top Expert 2010
Commented:
http://support.microsoft.com/kb/968929 is where you can get Powershell 2 (Scroll halfway down as far as you can). Gimme a minute and I'll give you a script.

Author

Commented:
for sps 2003 r2, I want this download:

Download the Windows Management Framework Core for Windows Server 2003 package now. (http://www.microsoft.com/downloads/details.aspx?FamilyId=f002462b-c8f2-417a-92a3-287f5f81407e)


?
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Adam BrownSenior Systems Admin
Top Expert 2010
Commented:
I believe so.
Adam BrownSenior Systems Admin
Top Expert 2010
Commented:
Whew...This is the most intense powershell script I've ever written. I don't really even understand some of it. And I don't know if you can use it. Cause Windows 2003 doesn't have Active Directory Powershell *headdesk* Oh well. The code is below. I'll research the possibility of getting Powershell 2 to work with AD in Windows 2003. (And the code is so *cool* too)
write-host "Enter the number of days since last logon"
$days = read-host
$d = [DateTime]::Today.AddDays(-$days)
get-adcomputer -filter * -properties lastlogontimestamp | export-csv C:\output.csv
import-csv c:\output.csv | foreach-object {$date = [DateTime]::FromFileTime([Int64]::Parse($_.lastlogontimestamp))
if($date -lt $d)
{
add-content c:\computers.txt $_.name	
add-content c:\computers.txt $date
add-content c:\computers.txt "`r"
}}
del output.csv

Open in new window

Adam BrownSenior Systems Admin
Top Expert 2010
Commented:
At any rate, while I'm doing that, take a look at AD Manager Plus and see if it will fit your needs (budgetary included). And if someone that knows how to do this with VBScript hops along, they're welcome to it.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial