Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I'm trying to query computer objects from AD.
How can I identify the enabled/disabled status?
Any suggestions?
https://support.microsoft.com/en-us/kb/305144
You would do a bitwise AND with decimal 2 to determine if it is disabled:
psuedocode:
(userAccountControl & 2) != 0) // disabled