Filtering Inactive User Profiles From an SSP

To filter inactive Active Directory users from a Share Services Provider, an updated “User Filter” is required. The following filter:

(&(objectCategory=Person)(objectClass=User)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))

will automatically skip over inactive domain accounts when profile imports are occurring.

Using DSQUERY to find distinguished names in Active Directory

If you ever need to find the distinguished name of a user in Active Directory, you can use the following DSQUERY command.

DSQUERY.exe * -limit 0 -filter "(&(objectCategory=Person)(objectClass=User)(!userAccountControl:1.2.840.113556.1.4.803:=2))" > "c:\activeUsers.txt"

The above command will output all of the active users in the current login name to a text file called activeUsers.txt in the root of the C: drive.

Performance Optimization WordPress Plugins by W3 EDGE