Solved

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

Posted on 2016-10-22
2
17 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
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 …

911 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

14 Experts available now in Live!

Get 1:1 Help Now