Share via


Remove-PartnerCustomerUser

Removes a user from the customer's tenant.

Syntax

ByUserId (Default)

Remove-PartnerCustomerUser
    [-CustomerId] <String>
    -UserId <String>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByUpn

Remove-PartnerCustomerUser
    [-CustomerId] <String>
    -UserPrincipalName <String>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-PartnerCustomerUser cmdlet removes the specified user from the customer tenant.

Examples

Example 1

PS C:\> Remove-PartnerCustomerUser -CustomerId db8ea5b4-a69b-45f3-abd3-dca19e87c536 -UserPrincipalName "hugh@wingtiptoys.onmicrosoft.com"

Removes the customer user with the User Principal Name of Hugh@wingtiptoys.onmicrosoft.com

Example 2

PS C:\> Remove-PartnerCustomerUser -CustomerId db8ea5b4-a69b-45f3-abd3-dca19e87c536 -UserId

Removes the customer user with the User identifier of 6e668259-1f09-479d-bcb8-d9b03e826b8d

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomerId

Identifier for the customer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserId

Identifier for the user.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByUserId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UserPrincipalName

Identifier for the customer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByUpn
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

System.Boolean