My PowerShell

Windows Powershell scripts, examples, tips, docs …

Welcome to My-PowerShell.com – your friendly source for Windows PowerShell scripts, tips and code examples.

More information about Powershell http://en.wikipedia.org/wiki/Windows_PowerShell.

How to Find Inactive AD Users (0)

2/28/12 •

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