Skip to content

Instantly share code, notes, and snippets.

@TheKevinWang
Last active May 16, 2018 15:15
Show Gist options
  • Save TheKevinWang/bc85a3a0eba5ccf4811b6dc74cd06829 to your computer and use it in GitHub Desktop.
Save TheKevinWang/bc85a3a0eba5ccf4811b6dc74cd06829 to your computer and use it in GitHub Desktop.
Get last login time and description of local accounts
([ADSI]"WinNT://$env:COMPUTERNAME").Children | ? {$_.SchemaClassName -eq 'user'} | ft name,lastlogin,description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment