Files
docs/scripts/powershell/reporting/inactive-users.md
Nicole Rappe 554c04aa32
All checks were successful
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 5s
Documentation Restructure
2026-02-27 04:02:06 -07:00

364 B

tags
tags
PowerShell
Reporting
Scripting
InactiveDays = 30
$Days = (Get-Date).Adddays(-($InactiveDays))
Get-ADUser -Filter {LastLogonTimeStamp -lt $Days -and enabled -eq $true} -Properties LastLogonTimeStamp |
select-object Name,@{Name="Date"; Expression={[DateTime]::FromFileTime($_.lastLogonTimestamp).ToString('MM-dd-yyyy')}}