Why is the below not working correctly? It should Write-Host 'Active', but it doesn't?
PS C:\Windows\system32> $(Get-ADUser JoeBloggs -Properties *).PasswordExpired
False
PS C:\Windows\system32> if ($(Get-ADUser JoeBloggs -Properties *).PasswordExpired -eq "False") { Write-Host "Active" } else { Write-Host "Locked" }
Locked
Thanks.