Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save norman-bauer/2a1db846b5aa38c33ccffd587d4670c8 to your computer and use it in GitHub Desktop.
Save norman-bauer/2a1db846b5aa38c33ccffd587d4670c8 to your computer and use it in GitHub Desktop.
$username = "typeusernamehere"
[datetime]::FromFileTime((Get-ADDomainController -Filter * | foreach {Get-ADUser $username -Properties LastLogon -Server $_.Name | select LastLogon} | Measure-Object -Property LastLogon -Maximum).Maximum)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment