|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Set-Mailbox -EmailAddresses
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 Louis Göhl wrote:
> Hi, Figured it out myself... :-)> > 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? With the following code you can add more than one email addresses: > import-CSV CreateRecipients.csv | foreach { There has to be a mailbox created with the New-Mailbox cmdlet before you > $Temp = Get-Mailbox -identity $_.UPN > $Temp.EmailAddresses.Add($_.Emailadres1) > $Temp.EmailAddresses.Add($_.Emailadres2) > $Temp.EmailAddresses.Add($_.Emailadres3) > Set-Mailbox -Instance $Temp} can run the above script. -- Louis |
|||||||||||||||||||||||