You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought I could fix with the follow code replacement but not sure why it is not wording.
Your Code: ManagedBy = (ManagedByValue.Split(',')[0]).Split('=')[1];
Replacement: ManagedBy = (ManagedByValue.Split(',OU=')[0]).Replace(',',',').Replace('CN=','');
I see your code uses a Class. Never used them so wondering it the syntax of it is not acceptable in a class.
I would think it would be advantages for your script to be able to handle such a situation. I have worked with several large companies and they all used Last, First for accounts. Only ran into one merge where the other company use first last.
Any help is appreciated.
Thanks,
Carlos
PS Beautiful work on the script. Thanks for sharing it.
The text was updated successfully, but these errors were encountered:
My domain uses Last, First format for the accounts. When the script parses the ManagedByValue it returns only the Last Name. The DN is a follow:
CN=Ramos, Carlos,OU=Technology_HQ,OU=Users,DC=Domain,DC=local
Script result is Ramos\
I thought I could fix with the follow code replacement but not sure why it is not wording.
Your Code: ManagedBy = (ManagedByValue.Split(',')[0]).Split('=')[1];
Replacement: ManagedBy = (ManagedByValue.Split(',OU=')[0]).Replace(',',',').Replace('CN=','');
I see your code uses a Class. Never used them so wondering it the syntax of it is not acceptable in a class.
I would think it would be advantages for your script to be able to handle such a situation. I have worked with several large companies and they all used Last, First for accounts. Only ran into one merge where the other company use first last.
Any help is appreciated.
Thanks,
Carlos
PS Beautiful work on the script. Thanks for sharing it.
The text was updated successfully, but these errors were encountered: