I am trying to find a way to locate a specific computer in LDAP and pass it's distinguishedName in to a variable.
The problem is, I am not sure which OU the PC is in.
The common LDAP path is LDAP://OU=Computers,DC=Company,DC=Corp,DC=Net (fake one) under OU=Computers there couple of dozen OUs, and each one of them has 4-10 OUs, and those are the OUs that contain the computer containers.
So the full path for one of the computers would be:
LDAP://CN=MyPC0001,OU=IT,OU=Desktops,OU=Computers,DC=Company,DC=Corp,DC=Net (also fake one)
Now, I am trying to find a way to locate another PC, lets say CN=MyPC0002.
Any ideas?
Thank you.
Jeka.