Hey, I have Problem with the data in my Active Directory notes field. The following code reads the notes field and splitts some Infos out of the string. That works fine in my test Environment. In the real Environment there is the Problem that the notes field isn't identic all the time, mostly the order of the subjects is different, example:
1. Notes Field: [A]LetterA [B]LetterB [C]LetterC
2. Notes Field: [C]LetterC [B]LetterB [A]LetterA
Actually I'm working with the following code:
$managedByUserGroup= #the current Group name
$LetterA = ($managedByUserGroup.info.Split("[]")[2]) $LetterB = ($managedByUserGroup.info.Split("[]")[6])
In consequence of the wrong order doesn't work it anymore....
Is it possible to run through the notes field and do something like:
If you found [A] save the text after [A] in $Letter[A], If you found [B] save the text after [B] in $Letter[B], same for [C], if you found nothing leave it blank.
Any ideas?
Thanks for the help...!!!!