Get Organizational Unit of a sAMAccountName

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? :slight_smile:

get-aduser n.karetnikov | select distinguishedname

so simple! :slight_smile:
Thank you!!!