Remove-MsolRoleMember

Removes a member from an administrator role.

Syntax

Remove-MsolRoleMember
      -RoleObjectId <Guid>
      [-RoleMemberType <RoleMemberType>]
      [-RoleMemberObjectId <Guid>]
      [-RoleMemberEmailAddress <String>]
      [-TenantId <Guid>]
      [<CommonParameters>]
Remove-MsolRoleMember
      [-RoleMemberType <RoleMemberType>]
      [-RoleMemberObjectId <Guid>]
      [-RoleMemberEmailAddress <String>]
      -RoleName <String>
      [-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
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-RoleMemberObjectId

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

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

-RoleMemberType

Specifies the type of role of the member to remove.

Type:RoleMemberType
Position:Named
Default value:None
Required:False
Accept pipeline input:True
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
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False