Is there a way to get a place (OU) where a particular sAMAccountName is held?
E.x. I have n.karetnikov in a domain with 100k users. I do not know which Organization Unit this userID is stored. The result of the script would be smth like “OU=users,OU=moscow_site,DC=mycompany,DC=RU”
Is that possible at all?
get-aduser n.karetnikov | select distinguishedname