Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

Split escaped characters

$
0
0
My network admins, in their wisdom, created admin accounts for us developers for those time when we simply must have some privileges.As you can see, my CN appears to be based on my DisplayName (Admin-LastName, Paul) rather than a concatenation of my FirstName and sn (Paul and Admin-LastName, respectively).CN=Admin-Lastame\, Paul,OU=Users,OU=Data_Admins,OU=Admins,DC=....My problem is that I need to split the CN based on comma, and don't know how to get -split to ignore the escaped comma after Admin-LastName.I was not able to find, among the myriad examples in the split docs on Technet, this kind of case.How do I do this? Do I need to replace the escape?For that matter, is there a better way of getting to the endpoint, which is, I need a list of all AD groups and their members in a FirstName.LastName format, not using QAD cmdlets?TIA.

Viewing all articles
Browse latest Browse all 467

Trending Articles