Solved

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

Posted on 2016-10-22
2
67 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
[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
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

761 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