Exchange 2020 get mailbox database permissions

To exchange 2020 get mailbox database permissions, you can use the following PowerShell commands:

Get-MailboxDatabasePermissions

This command retrieves the permissions for a specific mailbox database.

Example:

Get-MailboxDatabase -Identity <DatabaseName> | Get-MailboxDatabasePermissions

Replace <DatabaseName> with the name of the mailbox database you want to retrieve permissions for.

Get-MailboxDatabasePermission

This command retrieves the permissions for a specific mailbox database and a specific user or group.

Example:

Get-MailboxDatabasePermission -Identity <DatabaseName> -User <Username>

Replace <DatabaseName> with the name of the mailbox database you want to retrieve permissions for, and <Username> with the username or group you want to retrieve permissions for.

Get-MailboxPermission

This command retrieves the permissions for a specific mailbox.

Example:

Get-MailboxPermission -Identity <MailboxName>

Replace <MailboxName> with the name of the mailbox you want to retrieve permissions for.

Get-RecipientPermission

This command retrieves the permissions for a specific recipient (e.g. a mailbox, contact, or distribution group).

Example:

Get-RecipientPermission -Identity <RecipientName>

Replace <RecipientName> with the name of the recipient you want to retrieve permissions for.

Set-MailboxDatabasePermission

This command sets the permissions for a specific mailbox database.

Example:

Set-MailboxDatabasePermission -Identity <DatabaseName> -User <Username> -AccessRights <AccessRights>

Replace <DatabaseName> with the name of the mailbox database you want to set permissions for, <Username> with the username or group you want to set permissions for, and <AccessRights> with the desired access rights (e.g. "FullAccess", "Owner", etc.).

Set-MailboxPermission

This command sets the permissions for a specific mailbox.

Example:

Set-MailboxPermission -Identity <MailboxName> -User <Username> -AccessRights <AccessRights>

Replace <MailboxName> with the name of the mailbox you want to set permissions for, <Username> with the username or group you want to set permissions for, and <AccessRights> with the desired access rights (e.g. "FullAccess", "Owner", etc.).

Set-RecipientPermission

This command sets the permissions for a specific recipient (e.g. a mailbox, contact, or distribution group).

Example:

Set-RecipientPermission -Identity <RecipientName> -User <Username> -AccessRights <AccessRights>

Replace <RecipientName> with the name of the recipient you want to set permissions for, <Username> with the username or group you want to set permissions for, and <AccessRights> with the desired access rights (e.g. "FullAccess", "Owner", etc.).

Note: You need to run these commands in the Exchange Management Shell (EMS) or Exchange PowerShell module to manage mailbox database permissions.