get-aduser -filter enabled -eq true not working

Posted by MaTOntes@reddit | sysadmin | View on Reddit | 16 comments

Has something changed with how AD stores and marks users as disabled? The below script returns this user even though they are definitely disabled. I'm just trying to get a list of all enabled users for a different task. It seems in my environment the "Enabled -eq 'true' " filter doesn't work where in the past I know it's worked as expected. Get-ADUser -filter 'DisplayName -eq "joe blogs" -and Enabled -eq "True" '