Tools Links Login

Find Inactive Users in Active Directory

Search for people who haven't logged on to a domain in the past 180 days.

$180days = (get-date).adddays(-180)
get-aduser -filter * -properties lastlogondate | sort -property lastlogondate | Where-Object { $_.lastlogondate -le $180days } | export-csv c:\temp\inactiveUsers.csv

About this post

Posted: 2022-08-25
By: dwirch
Viewed: 227 times

Categories

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.