Skip to content

Add-MailboxRightsFromGroup

SYNOPSIS

Assign editor or send-as permissions to a mailbox for one or more users based on a specified rights group.

SYNTAX

Add-MailboxRightsFromGroup [-Group] <Object> [-User] <Array> [-Remove] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

The `Add-MailboxRightsFromGroup` function assigns editor or send-as permissions to a mailbox for one or more users based on a specified rights group. The group determines the type of permissions to be granted (e.g., `_R` for FullAccess or `_S` for SendAs). The function also supports removing permissions if the `-Remove` switch is specified.

EXAMPLES

EXAMPLE 1

Add-MailboxRightsFromGroup -Group L_MBX_DG_Servicedesk_R -User Brilsmurf

Assigns FullAccess permissions to the mailbox associated with the group `L_MBX_DG_Servicedesk_R` for the user `Brilsmurf`.

EXAMPLE 2

Add-MailboxRightsFromGroup -Group L_MBX_DG_Servicedesk_R -User @('Brilsmurf', 'Smurfin')

Assigns FullAccess permissions to the mailbox associated with the group `L_MBX_DG_Servicedesk_R` for the users `Brilsmurf` and `Smurfin`.

EXAMPLE 3

@('L_MBX_DG_Servicedesk_R', 'L_MBX_DG_Servicedesk_S') | Add-MailboxRightsFromGroup -User Brilsmurf

Assigns FullAccess and SendAs permissions to the mailbox associated with the groups `L_MBX_DG_Servicedesk_R` and `L_MBX_DG_Servicedesk_S` for the user `Brilsmurf`.

EXAMPLE 4

Add-MailboxRightsFromGroup -Group L_MBX_DG_Servicedesk_R -User Brilsmurf -Remove

Removes FullAccess permissions from the mailbox associated with the group `L_MBX_DG_Servicedesk_R` for the user `Brilsmurf`.

PARAMETERS

-Group

The rights group that specifies the permissions to be assigned (e.g., `L_MBX_...R` for FullAccess or `L_MBX..._S` for SendAs).

Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-User

An array of users (e.g., UPNs or SamAccountNames) to whom the permissions will be granted or revoked.

Type: Array
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Remove

A switch to indicate that the specified permissions should be removed instead of granted.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: False
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
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.

INPUTS

OUTPUTS

NOTES