Hi I want to check if a useraccount in AD is enabled or disabled
[pre]
#Install-Module -name azuread
Connect-AzureAD
$Account = "user@mail.com"
$value ="False"
$accountEnabled =get-azureADUser -objectid $Account | select accountEnabled
if ($accountEnabled -eq $value){
Write-Host "please continue"
}
else {
write-host "exit script"
}
[/pre]
when I run the above script it gives me as output "exit script"
when I run $accountEnabled I get this as output
AccountEnabled
--------------
False
how do I capture the value "False" here?
Paul