I need to query AD to determine if a users account is disabled.
Using a similar query used in the answers here
FROM OPENQUERY(ADSI, 'SELECT sAMAccountName
WHERE objectCategory = ''Person''
AND objectClass = ''user'')
WHERE userAccountControl & 2 <> 0
Apparently it did work... this would be an ID-10-T :p