Add-IDRoleMember

Add-IDRoleMember

SYNOPSIS

Add users, roles, or groups to a role

SYNTAX

Add-IDRoleMember [-ID] <Object> [[-Users] <Array>] [[-Roles] <Array>] [[-Groups] <Array>]
 [<CommonParameters>]

DESCRIPTION

Adds the specified users, roles, and/or groups as members of an existing role. Supply one or more of -Users, -Roles, or -Groups with the identifiers of the principals to add; any parameter left unspecified is treated as empty.

EXAMPLES

Example 1

PS C:\> Add-IDRoleMember -ID '881512ca-d441-4997-a55e-19ec5374f3b3' -Users someuser@somedomain.com

Add a user as a member of the role

Example 2

PS C:\> Add-IDRoleMember -ID '881512ca-d441-4997-a55e-19ec5374f3b3' -Roles 'Helpdesk','App Owners' -Groups 'Contractors'

Add roles and a group as members of the role

PARAMETERS

-Groups

An array of group names (or IDs) to add as members of the role.

Type: Array
Parameter Sets: (All)
Aliases:

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

-ID

The ID/UUID/_RowKey of the role to add members to - not its display name.

Type: Object
Parameter Sets: (All)
Aliases: Uuid

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

-Roles

An array of role names (or IDs) to add as nested members of the role.

Type: Array
Parameter Sets: (All)
Aliases:

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

-Users

An array of usernames (or IDs) to add as members of the role.

Type: Array
Parameter Sets: (All)
Aliases:

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

System.Object

OUTPUTS

System.Object

NOTES