Remove-MsolRoleMember

Removes a member from an administrator role.

Syntax

Remove-MsolRoleMember [-RoleMemberEmailAddress <String>] [-RoleMemberObjectId <Guid>]
 [-RoleMemberType <RoleMemberType>] -RoleName <String> [-TenantId <Guid>] [<CommonParameters>]
Remove-MsolRoleMember [-RoleMemberEmailAddress <String>] [-RoleMemberObjectId <Guid>]
 [-RoleMemberType <RoleMemberType>] -RoleObjectId <Guid> [-TenantId <Guid>] [<CommonParameters>]

Description

The Remove-MsolRoleMember cmdlet removes a user from an administrator role.

Examples

Example 1: Remove a member from an administrator role

PS C:\> Remove-MsolRoleMember -RoleName "Company Administrator" -RoleMemberType User -RoleMemberEmailAddress "elisadaugherty@contoso.com"
This command removes elisadaugherty@contoso.com from the Company Administrator role.

Parameters

-RoleMemberEmailAddress

Specifies the member remove add.
Specify either the RoleMemberEmailAddress or RoleMemberObjectId parameter.

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

-RoleMemberObjectId

Specifies the unique object ID of the member to remove.
Specify either RoleMemberEmailAddress or RoleMemberObjectId.

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

-RoleMemberType

Specifies the type of role of the member to remove.

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

-RoleName

Specifies the name of the role from which to remove members.
Specify either the RoleName or RoleObjectId parameter.

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

-RoleObjectId

Specifies the unique ID of the role from which to remove members.
Specify either RoleName or RoleObjectId.

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

-TenantId

Specifies the unique ID of the tenant on which to perform the operation.
The default value is the tenant of the current user.
This parameter applies only to partner users.

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