--- tags: - PowerShell - Reporting - Scripting --- ## Purpose This document records the procedure for inactive computers. Follow the environment assumptions and commands below. ```powershell $DaysInactive = 30 $time = (Get-Date).Adddays(-($DaysInactive)) Get-ADComputer -Filter {LastLogonTimeStamp -lt $time} -ResultPageSize 2000 -resultSetSize $null -Properties Name | Select Name ``` ## Related Documentation - [Related Identity and Certificates Documentation](<../../../../reference/Identity and Certificates/index.md>) — Find the connected deployments, procedures, and references for this subject.