Files
docs/operations/reference/powershell/reporting/inactive-computers.md
2026-01-28 20:41:51 -07:00

267 B

tags
tags
PowerShell
Reporting
Scripting
$DaysInactive = 30
$time = (Get-Date).Adddays(-($DaysInactive))
Get-ADComputer -Filter {LastLogonTimeStamp -lt $time} -ResultPageSize 2000 -resultSetSize $null -Properties Name | Select Name