Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $currentDate = Get-Date
- $daysAgo = 5
- $dateAgo = $currentDate.AddDays(-$daysAgo)
- "Current Date = " + $currentDate
- "Days Ago = " + $daysAgo
- "Date Ago = " + $dateAgo
- Get-ADUser -Filter * -Properties LastLogonDate | Select Name, LastLogonDate | where { $_.LastLogonDate -lt $dateAgo}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement