Benutzer-Werkzeuge

Webseiten-Werkzeuge


activedirectory:lastlogontimestamppowershell

Lastlogontimestamp in Powershell

Get-ADUser -Filter * -Properties LastLogonTimeStamp `
|Select-Object -Property SamAccountName, Name, @{"Name"="Last successful logon";Expression={[datetime]::FromFileTime($_.'LastLogonTimeStamp')}} `
|Sort-Object Name `
|Format-Table

LastLogon weniger als 90 Tage

Get-ADUser -Filter * -Properties LastLogonTimeStamp, Company ` | Where-Object{$_.LastLogonTimeStamp -gt (((Get-Date).AddDays(-90)).tofileTime())} `
|Select-Object -Property SamAccountName, Name, Company, @{"Name"="Last successful logon";Expression={[datetime]::FromFileTime($_.'LastLogonTimeStamp')}} `
|Sort-Object Name `
|Format-Table

activedirectory/lastlogontimestamppowershell.txt · Zuletzt geändert: 2017/09/25 15:32 von ronny

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki