AD User Logon Report

This PowerShell Script will give you an output that shows the Active Directory User logon report. The output would have details of the type of login (remote or local), the date, status of login (failed or successful login), username, workstation name and the IP from where they have logged in


# Find DC list from Active Directory
$DCs = Get-ADDomainController -Filter *

# Define time for report (default is 1 day)
$startDate = (get-date).AddDays(-1)

# Store successful logon events from security logs with the specified dates and workstation/IP in an array
foreach ($DC in $DCs){

Download Full Script

Login type: remote logon or local logon


Status: success for failure.

User name:

Workstation name:

IP address:

Share Script:

Purpose:To check AD User Logons
Type:PowerShell (.ps1)
Compatibility:Run with PowerShell
Tags:AD, Active Directory, User Logon Report
Reference link: