Find computers that last logged on 360 days ago with PowerShell

Use this code to find computers that last logged on 360 days ago:

$date = [DateTime]::Today.AddDays(-360); Get-ADComputer -Filter 'LastLogonDate -lt $date' -Properties LastLogonDate | FT Name,LastLogonDate

Kommentarer

Populære opslag fra denne blog

Microsoft Office 2016 and the AUTO_ACTIVATE property

Access Exchange online with Office 365 multi-factor authentication (MFA/2FA)

Disable logon and logoff events (event id 4624, 4625, 4634 (and all the other ones...))