when I type the following I get everything in distinguishedname
[PS] >Get-ActiveSyncDevice | select friendlyname, distinguishedname | ft
FriendlyName DistinguishedName
------------ -----------------
BlackBerry Z30 CN=BlackBerry§BB2BF9C62C,CN=ExchangeActiveSyncDevices,CN=Christopher.Ellis,OU=USERS,OU..
I would like to get only a section of the distinguishedname (not the whole line) I have more than 300 devices
What I would like my output to be (script would select CN=User only - stripping out other info
FriendlyName DistinguishedName
------------ ------------
BlackBerry Z30 Christopher.Ellis
Thank you for your help