Updates the specified customer user account.
Set-PCCustomerUser [-TenantId <String>] -UserId <String> [-FirstName <String>] [-LastName <String>] [-UserPrincipalName <String>] [-Location <String>] [-Password <SecureString>] [-ForceChangePassword <Boolean>] [-SaToken <String>] [<CommonParameters>]
The Set-PCustomerUser cmdlet modifies a customer user account.
Specifies the tenant used for scoping this cmdlet.
Required? false
Position? named
Default value $GlobalCustomerId
Accept pipeline input? false
Accept wildcard characters? false
Specifies the user id to modify.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies the modified first name for the user.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies the modified last name for the user.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies a modified user name including the domain name.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies a modified location for the user.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies an updated password as a secure string to set for the user.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies whether the user will need to change their password the next time they sign in.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
Specifies an authentication token with your Partner Center credentials.
Required? false
Position? named
Default value $GlobalToken
Accept pipeline input? false
Accept wildcard characters? false
Update a customer user's last name Find the tenant information about the customer named Wingtip Toys
PS C:\>$customer = Get-PCCustomer | Where-Object {$_.CompanyProfile.CompanyName -eq 'Wingtip Toys'}
Find the user with the joan@wingtiptoyscsptest.onmicrosoft.com
PS C:\>$user = Get-PCCustomerUser -TenantId $customer.id | Where-Object {$_.userPrincipalName -eq 'joan@wingtiptoyscsptest.onmicrosoft.com'}
Modify the user's last name
PS C:\>Set-PCCustomerUser -TenantId $customer.id -userId $user.id -LastName 'Sullivan'
Reset a customer user's password Find the tenant information about the customer named Wingtip Toys
PS C:\>$customer = Get-PCCustomer | Where-Object {$_.CompanyProfile.CompanyName -eq 'Wingtip Toys'}
Find the user with the joan@wingtiptoyscsptest.onmicrosoft.com
PS C:\>$user = Get-PCCustomerUser -TenantId $customer.id | Where-Object {$_.userPrincipalName -eq 'joan@wingtiptoyscsptest.onmicrosoft.com'}
Set the password for the user account and require the user to change the password during the next sign on.
PS C:\>$password = '<password>'
PS C:\>$passwordSecure = $password | ConvertTo-SecureString -AsPlainText -Force
PS C:\>Set-PCCustomerUser -TenantId $customer.id -UserId $user.Id -Password $passwordSecure -ForceChangePassword $true