Trying to write a script that will check whether a few accounts are enabled, locked out, and return the last password reset time. Any reason why $User.LockedOut or $_.LockedOut will not return a value?
$Users = "USER1","USER2","USER3"
ForEach ($User in $Users) {
Get-ADUser $User -Properties Name,sAMAccountType,Enabled,LockedOut,PasswordLastSet | Select Name,sAMAccountName,Enabled,LockedOut,PasswordLastSet | Out-Null
# Check if account is Enabled or Disabled
Write-Host $User.LockedOut
}