Hi @GeoffHGC ,
I'm not sure what are you going to do with these shared mailboxes but I do think the users need to have the Full Access permission to use them.
For your questions, you may use a csv file that include the datas we need like the name of the shared mailbox and the forwarding addresses, and also display name like:
Name,DisplayName,Internal
a,a,aaa@keyman .com
b,b,bbb@keyman .com
Then:
$test = import-csv c:/1/1.csv
Foreach ($data in $test){If((Get-mailbox $data.Name -ErrorAction 'SilentlyContinue') -eq $null){
New-Mailbox -Name $data.Name -DisplayName $data.DisplayName -Shared
}
Set-Mailbox -Identity $data.name -DeliverToMailboxAndForward $True -ForwardingAddress $data.Internal
}
For the external smtp addresses, create another csv like:
Name,DisplayName,External
a,a,aaa@keyman .com
b,b,bbb@keyman .com
$test = import-csv c:/1/1.csv
Foreach ($data in $test){If((Get-mailbox $data.Name -ErrorAction 'SilentlyContinue') -eq $null){
New-Mailbox -Name $data.Name -DisplayName $data.DisplayName -Shared
}
Set-Mailbox -Identity $data.name -ForwardingSMTPAddress $data.External
}
The original cmdlet was here: https://learn.microsoft.com/en-us/answers/questions/275036/exchange-online-shared-mailbox-bulk-create.html
I just changed the last paragraph:)
Best regards,
Lou
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.