Solved

AD Query for last computer login date

Posted on 2010-11-25
4
2,580 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

As network administrators; we know how hard it is to track user’s login/logout using security event log (BTW it is harder now in windows 2008 because user name is always “N/A” in the grid), and most of us either get 3rd party tools, or just make our…
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
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 transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now