Solved

AD Query for last computer login date

Posted on 2010-11-25
4
2,648 Views
Last Modified: 2012-05-10
Hi.

I am looking for a query (dsquery or similar) that will give me the last login date to the domain of a computer on Server 2003.

If possible, I would also like to know the user account.

Cheers
0
Comment
Question by:agbnielsen
  • 3
4 Comments
 
LVL 6

Expert Comment

by:camacho_marco
ID: 34215072
Take a look at this...

http://www.windowsnetworking.com/kbase/WindowsTips/Windows2003/AdminTips/Admin/PruningOldComputerAccountsinAD.html

following command will find all computers in Active Directory that have not been logged into during the past 8 weeks:

dsquery computer -inactive 8 -limit 0

After reviewing this list to make sure these computers no longer exist on your network you can use the following command to find and delete them:

dsquery computer -inactive 8 -limit 0 | dsrm



Cheers
0
 
LVL 6

Accepted Solution

by:
camacho_marco earned 400 total points
ID: 34215092
You can also download this free tool

http://www.cjwdev.co.uk/Software/ADTidy/Download.html

Cheers
0
 

Author Closing Comment

by:agbnielsen
ID: 34215167
Perfect
0
 
LVL 6

Expert Comment

by:camacho_marco
ID: 34215199
Thanks 4 the points amigo

Cheers
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html) provided 218 attendees with a step-by-step guide for identifying Acti…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question