Link to home
Start Free TrialLog in
Avatar of Xytras1
Xytras1

asked on

PowerShell 2.0 Regex Distinguished Names.

Looking for a way to parse a string that contains multiple Distinguished Names to put the names into a separate array.
Example.

$String = "CN=John S. Smith*a,OU=Users,OU=Tier 8,OU=Admins,DC=fg,DC=ef,DC=na,DC=ORG CN=Joe D. Smith*a,OU=Users,OU=Tier 2,OU=Admins,DC=fd,DC=hd,DC=tv,DC=ORG"

to

$NewString ="CN=John S. Smith*a,OU=Users,OU=Tier 8,OU=Admins,DC=fg,DC=ef,DC=na,DC=ORG"
"CN=Joe D. Smith*a,OU=Users,OU=Tier 2,OU=Admins,DC=fd,DC=hd,DC=tv,DC=ORG"
ASKER CERTIFIED SOLUTION
Avatar of footech
footech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Xytras1
Xytras1

ASKER

Works great. Thank you.