Skip to content

Get-MailboxByPermissionGroup

SYNOPSIS

Retrieve mailboxes associated with a specific permission group.

SYNTAX

Get-MailboxByPermissionGroup [-Identity] <String> [<CommonParameters>]

DESCRIPTION

The `Get-MailboxByPermissionGroup` function retrieves mailboxes associated with a specific permission group in Active Directory. It identifies groups matching the naming convention `L_MBX_..._[RS]`, extracts the associated mailboxes, and retrieves their recipient details.

EXAMPLES

EXAMPLE 1

Get-MailboxByPermissionGroup -Identity "L_MBX_Sales_R"

Retrieves mailboxes associated with the permission group `L_MBX_Sales_R`.

EXAMPLE 2

"L_MBX_Sales_R", "L_MBX_Marketing_S" | Get-MailboxByPermissionGroup

Retrieves mailboxes associated with the permission groups `L_MBX_Sales_R` and `L_MBX_Marketing_S`.

PARAMETERS

-Identity

The identity of the permission group (e.g., DistinguishedName, UserPrincipalName, or sAMAccountName) to retrieve associated mailboxes.

Type: String
Parameter Sets: (All)
Aliases: DN, DistinguishedName, UserPrincipalName, UPN, sAMAccountName, Mailbox

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
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.

INPUTS

OUTPUTS

NOTES