Home All Groups Group Topic Archive Search About

Set-Mailbox -EmailAddresses



Author
13 Mar 2007 12:43 PM
Louis_Göhl
Hi,

I want to use the following cmdlet:

Set-Mailbox -EmailAddresses <ProxyAddressCollection>

> The EmailAddresses parameter specifies all the proxy addresses of the mailbox. It includes the primary Simple Mail Transfer Protocol (SMTP) address as one of the proxy addresses. If you use this parameter, you cannot use the PrimarySMTPAddress parameter.

Can anyone tell me what the syntax is if I want to specify more than one
email address?

Thanx,

Louis

Author
14 Mar 2007 7:50 AM
Louis_Göhl
Louis Göhl wrote:

> Hi,
>
> I want to use the following cmdlet:
>
> Set-Mailbox -EmailAddresses <ProxyAddressCollection>
>
>> The EmailAddresses parameter specifies all the proxy addresses of the
>> mailbox. It includes the primary Simple Mail Transfer Protocol (SMTP)
>> address as one of the proxy addresses. If you use this parameter, you
>> cannot use the PrimarySMTPAddress parameter.
>
> Can anyone tell me what the syntax is if I want to specify more than one
> email address?

Figured it out myself...  :-)
With the following code you can add more than one  email addresses:

> import-CSV CreateRecipients.csv | foreach {
> $Temp = Get-Mailbox -identity $_.UPN
> $Temp.EmailAddresses.Add($_.Emailadres1)
> $Temp.EmailAddresses.Add($_.Emailadres2)
> $Temp.EmailAddresses.Add($_.Emailadres3)
> Set-Mailbox -Instance $Temp}

There has to be a mailbox created with the New-Mailbox cmdlet before you
can run the above script.

--
Louis

AddThis Social Bookmark Button