Phone Get Quote
US: +1 888 720 9500
US: +1 888 791 1189
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9892

How to generate and export last logged on user report

System administrators make use of computers' last logon by users report to check for unauthorized logons into the organization's Active Directory. This report can help prevent potential cyberattacks.

The following is a comparison between obtaining an AD computer's last logon by a user report with Windows PowerShell and ADAudit Plus:

Windows PowerShell

Steps to obtain the last logged on users using PowerShell:

  • Identify the domain from which you want to retrieve the report.
  • Identify the LDAP attributes you need to fetch for the report.
  • Identify the primary DC to retrieve the report.
  • Compile the script.
  • Execute it in Windows PowerShell.

Sample Windows PowerShell Script

Get-ADComputer -Properties "LastLogonDate"

ADAudit Plus

To obtain the report,

  • Login to ADAudit Plus web console as an administrator.
  • Navigate to the Reports tab and from the User Logon section in the left pane, select Last Logon on Workstations report.
  • Select the domain and click Generate.
  • Select Export As to export the report in any of the preferred formats (CSV, PDF, HTML, CSVDE and XLSX).



Following are the limitations to obtain a report of last logon on workstations using native tools like Windows PowerShell:

  • The script can be executed only from the computers which has Active Directory Domain Services role.
  • It's difficult to generate the report for different time zones and date formats.
  • It is difficult to export the report in file formats other than CSV.
  • Applying more filters like OU or 'User name starts with' will increase the LDAP query complexity.

ADAudit Plus will generate the report of last logon of users in a particular workstation and display it in a simple and intuitively designed UI.

  • Avoid complex PowerShell-scripting, and simplify AD change auditing with ADAudit Plus.
  • By clicking 'Get Your Free Trial', you agree to processing of personal data according to the Privacy Policy.
  • Thanks!
  • Your download is in progress and it will be completed in just a few seconds! If you face any issues, download manually here.

Related Resources

ADAudit Plus Trusted By