Solved

Powershell to check AD attributes for the last logon user in AD computer ?

Posted on 2016-10-22
2
15 Views
Last Modified: 2016-11-10
Hi People,

How can I check the attributes of the computer object and identify the last logged on user.

I can do it manually:

Open AD Users and Computers
Right click the object
Click the attributes tab
*optional* filter for attributes with values
Look for the value:  last logged on user

Thanks in advance,
0
Comment
  • 2
2 Comments
 
LVL 6

Accepted Solution

by:
Niten Kumar earned 500 total points (awarded by participants)
ID: 41854948
Have a look at this link below:

http://gallery.technet.microsoft.com/scriptcenter/Get-Active-Directory-User-bbcdd771

Assuming you don't have the AD modules, the last program linked on this page (PSLimitedLastlogon.ps1):

http://www.rlmueller.net/Last%20Logon.htm

will document lastLogonTimeStamp for all users specified in an input file (pre-Windows 2000 logon names). The output is comma delimited, just redirect the output to a csv file.
0
 
LVL 6

Expert Comment

by:Niten Kumar
ID: 41881892
Solution provides what is requested in the question
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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…

706 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

17 Experts available now in Live!

Get 1:1 Help Now