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
Solved

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

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
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 …
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.

840 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