Shared Mailbox permissions

Roger Roger 6,471 Reputation points
2021-08-02T12:48:51.09+00:00

Hi All

i have 10 users and i want to provide access to shared mailbox. i have the csv file in the below format. i am using exchange 2016 hybrid environment, some shared mailboxes are created onprem and migrated to cloud, some are remote shared mailboxes creating from onprem.

Users
user1@Company portal .com

is the below syntax correct and in the below syntax is -Confirm:$false correct i get the confirmation Yes/No/A when adding manually, will -Confirm:$false take the option A

$UserList = import-csv C:\temp\list.csv   
ForEach ($User in $UserList)  
{  
Add-MailboxPermission -Identity sharedmailbox@contoso.com -User $user.Users -AccessRights FullAccess -InheritanceType All -AutoMapping $True  
Add-RecipientPermission sharedmailbox@contoso.com -AccessRights SendAs -Trustee $user.Users -Confirm:$false  
Set-Mailbox -Identity sharedmailbox@contoso.com -GrantSendOnBehalfTo $user.Users -Confirm:$false  
}  
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,632 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,708 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
2,166 questions
{count} votes

Accepted answer
  1. KyleXu-MSFT 26,271 Reputation points
    2021-08-03T01:46:35.383+00:00

    @Roger Roger

    Based on my testing, there doesn't exist issue with it. If you still get confirmation, try to add "-Confirm:$false" to this below one(Based on my testing, you don't need to add it).

    Add-MailboxPermission -Identity sharedmailbox@Company portal .com -User $user.Users -AccessRights FullAccess -InheritanceType All -AutoMapping $True

    If you get an error, please provide a screenshot about it. The screenshot will help us to narrow down that issue.


    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.