Solved

AD Query for last computer login date

Posted on 2010-11-25
4
2,817 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

627 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