Author Posts

September 26, 2017 at 10:11 am

Hello!
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? 🙂

September 26, 2017 at 11:35 am

get-aduser n.karetnikov | select distinguishedname

September 26, 2017 at 11:52 am

so simple! 🙂
Thank you!!!