I have a bunch of strings that are DN\'s of groups from AD. I need to pull out the Common Name. An example string is \"CN=Group Name I Want,OU=Group Container,DC=corp,DC=tes
$s = "CN=Group Name I Want,OU=Group Container,DC=corp,DC=test,DC=local" $s1 = ($s -split ",*..=")[1] $s1