get-mailbox Value Emailaddresses.prefix vs Prefixstring (get mailboxes with more than one SMTP Addresse)
That is correct.Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
August 13th, 2011 11:33am

PrefixString is uppercase if the address is a reply address, lowercase otherwise. Prefix is always uppercase.Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2011 1:27pm

Thanks for the Reply, so as i read, that the "-eq" Operator is no Case Sensitiv the script should work as expected. thanks and regards
August 14th, 2011 3:12am

Hello Guy's i just made a small Powershell Script. The Goal was to Return Every Mailbox wich has more than one SMTP Adresse. For this reason i needed to Filter out all SMTP Adresses. To Filter i i used the Value "prefixstring" at the e-mail addreses. But i also saw the Attribute "Prefix", and i want to know is there is any difference. For Example if you go into powershell: a$ = get-mailbox -idetity user1 and then you enter a$.mailaddresses The you get all Addresse of the user, including these two Attributes "Prefix" and "Prefixstring". Are these two always the same? Just if Someone is Curious thers the Script: $mailboxes = get-mailbox -resultsize 30000 foreach ($user in $mailboxes) { $count = 0 foreach ($mailaddress in $user.emailaddresses) { if ($mailaddress.prefixstring -eq "smtp") {$count++}} if ($count -gt 1) { echo "_____________________" | out-file -filepath c:\temp\mailaddressen.txt -append echo " " | out-file -filepath c:\temp\mailaddressen.txt -append echo $user.displayname | out-file -filepath c:\temp\mailaddressen.txt -append foreach ($mailaddress in $user.emailaddresses) { if ($mailaddress.prefixstring -eq "smtp") {echo $mailaddress.addressstring | out-file -filepath c:\temp\mailaddressen.txt -append}} echo " " | out-file -filepath c:\temp\mailaddressen.txt -append } }
Free Windows Admin Tool Kit Click here and download it now
August 14th, 2011 5:14am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics