Friday, June 13, 2014

AD/PowerShell - "Directory Object Not Found"

I ran into this error (it's not the first time either) when attempting to get-aduser with a searchbase containing an LDAP string.

get-aduser : Directory object not found

The reason for this is that instead of using ou=orgunit,dc=domain,dc=com you should substitute cn for ou.  So it'd be

get-aduser -searchbase "cn=users,dc=domain,dc=com"


No comments:

Post a Comment