Share via


Restore-PartnerCustomerUser

Restores a previously removed customer user from the customer's tenant.

Syntax

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

Description

The Restore-PartnerCustomerUser cmdlet restores the specified user that was previously removed from the customer tenant.

Examples

Example 1

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

Restores 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

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

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CustomerId

Identifier for the customer.

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

-UserId

Identifier for the user.

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

-UserPrincipalName

Identifier for the customer.

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

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Boolean