I am trying to enumerate through the OUs a user is in. I can get the AdsPath (LDAP://CN=TestUser\, OU=Admin, OU=CompanyName, DC=testco, DC=org) for the user but I do not want to parse the path just to get the OUs (Admin, CompanyName). I will be using a Vbscript via WSH. I will be using the OUs as a criteria for code (ie. OU=Admin for the user will get a password never expires setting).
I heard from a Microsoft rep you cannot do this but I am sure someone has figured it out!