6 thoughts on “Powershell to check if Account is Enable or Disabled.

  1. Allways use BitWise operators when dealing with UserAccountControl..

    Change the evaluation statments to this

    if($Value -BAND 2 -eq 0)
    {
    Write.Output “Account Enabled”
    }
    else
    {
    Write-Output “Account Disabled”
    }

  2. Pingback: Powershell Useraccountcontrol Disabled | Liyongbak

Leave a comment