Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. [CmdletBinding()]
  2. param(
  3. [parameter(mandatory=$true)]
  4. [ValidateNotNullOrEmpty()]
  5. [string]$user = $(Read-Host "Enter the Username")
  6. )
  7. Get-ADUser $user -Properties * | FT Name, DisplayName, @{Name='PasswordLastSet'; expression={[datetime]::fromFileTime($_.pwdlastset)}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement