Untitled
unknown
plain_text
a year ago
396 B
4
Indexable
Write-Host "Identifying machines that haven't checked in for $DaysSinceLastCheckIn days..." -ForegroundColor Cyan
$thresholdDate = (Get-Date).AddDays(-$DaysSinceLastCheckIn)
$inactiveComputers = $computers | Where-Object {
($_ .lastCheckInDateTime -eq $null) -or
([DateTime]$_ .lastCheckInDateTime -lt $thresholdDate)
}
Write-Host "Found $($inactiveComputers.Count) inactive machines."Editor is loading...
Leave a Comment