Add-MailboxRightsFromOtherUser
SYNOPSIS
Assign mailbox rights to users based on the rights of a reference user.
SYNTAX
Add-MailboxRightsFromOtherUser [-refUser] <Object> [-User] <Array> [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
The `Add-MailboxRightsFromOtherUser` function assigns mailbox rights to one or more users based on the rights of a specified reference user. It retrieves the groups associated with the reference user (starting with `L_MBX_`) and applies the corresponding rights to the target users.
EXAMPLES
EXAMPLE 1
Add-MailboxRightsFromOtherUser -refUser "[email protected]" -User "[email protected]"
Assigns mailbox rights to `user1@example.com` based on the rights of `refUser@example.com`.
EXAMPLE 2
Add-MailboxRightsFromOtherUser -refUser "[email protected]" -User @("[email protected]", "[email protected]")
Assigns mailbox rights to `user1@example.com` and `user2@example.com` based on the rights of `refUser@example.com`.
PARAMETERS
-refUser
The reference user whose mailbox rights will be used as a template.
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 mailbox rights will be assigned.
Type: Array
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
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.