Servus zusammen, versuche mal das hier:
Get-ADComputer -Filter * -Properties operatingsystem, lastlogondate, enabled |
Where-Object {
($_.operatingsystem -notlike "*Server*") -and
($_.lastlogondate -le (Get-Date).AddDays(-365)) -and
($_.enabled -eq $true)
} |
Sort-Object lastlogondate |
Format-Table Name, Lastlogondate
bitte beachten das ihr PowerShell auch als ADMIN ausführt
lg