Show-MailboxPermission
SYNOPSIS
Display mailbox permissions for a specified user or mailbox.
SYNTAX
Show-MailboxPermission [-Identity] <String> [-Permission] <String[]> [[-SendAsFrom] <Object>]
[<CommonParameters>]
DESCRIPTION
The `Show-MailboxPermission` function retrieves and displays mailbox permissions (Full Access or Send As) for a specified user or mailbox. It supports both on-premises and Exchange Online environments and ensures proper validation of mailboxes and permissions before displaying the results.
EXAMPLES
EXAMPLE 1
Show-MailboxPermission -Identity "[email protected]" -Permission FullAccess
Displays Full Access permissions for the mailbox `user@example.com`.
EXAMPLE 2
Show-MailboxPermission -Identity "[email protected]" -Permission SendAs -SendAsFrom Cloud
Displays Send As permissions for the mailbox `shared@example.com` in the Exchange Online environment.
PARAMETERS
-Identity
The identity of the mailbox or user for which permissions need to be displayed. Can be a UserPrincipalName, DistinguishedName, or Alias.
Type: String
Parameter Sets: (All)
Aliases: DN, DistinguishedName, UserPrincipalName, UPN, sAMAccountName
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-Permission
Specify which permission(s) to display. Valid options are `FullAccess` and `SendAs`.
Type: String[]
Parameter Sets: (All)
Aliases: Rights
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-SendAsFrom
Specify the environment for Send As permissions. Valid options are `Onprem` and `Cloud`.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.