Set-PnPUserProfileProperty
You must connect to the tenant admin website (https://:
Syntax
Set-PnPUserProfileProperty
-Value <String>
-Account <String>
-PropertyName <String>
[-Connection <SPOnlineConnection>]
Set-PnPUserProfileProperty
-Values <String[]>
-Account <String>
-PropertyName <String>
[-Connection <SPOnlineConnection>]
Description
Requires a connection to a SharePoint Tenant Admin site.
Examples
------------------EXAMPLE 1------------------
Set-PnPUserProfileProperty -Account 'user@domain.com' -Property 'SPS-Location' -Value 'Stockholm'
Sets the SPS-Location property for the user as specified by the Account parameter
------------------EXAMPLE 2------------------
Set-PnPUserProfileProperty -Account 'user@domain.com' -Property 'MyProperty' -Values 'Value 1','Value 2'
Sets the MyProperty multi value property for the user as specified by the Account parameter
Required Parameters
The account of the user, formatted either as a login name, or as a claims identity, e.g. i:0#.f|membership|user@domain.com
Type: | String |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The property to set, for instance SPS-Skills or SPS-Location
Type: | String |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The value to set in the case of a single value property
Type: | String |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The values set in the case of a multi value property, e.g. "Value 1","Value 2"
Type: | String[] |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Optional Parameters
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: | SPOnlineConnection |
Position: | Named |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Related Links
Feedback
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.
Loading feedback...