Set-SPUser
Published: July 16, 2012
Applies to: SharePoint Foundation 2013 | SharePoint Server 2013 Enterprise
Configures properties of an existing user.
Set-SPUser [-Identity] <SPUserPipeBind> [-AddPermissionLevel <String[]>] [-AssignmentCollection <SPAssignmentCollection>] [-ClearPermissions <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-DisplayName <String>] [-Email <String>] [-Group <SPGroupPipeBind>] [-IsSiteCollectionAdmin <SwitchParameter>] [-PassThru <SwitchParameter>] [-RemovePermissionLevel <String[]>] [-SyncFromAD <SwitchParameter>] [-Web <SPWebPipeBind>] [-WhatIf [<SwitchParameter>]]
Parameters
| Parameter | Required | Type | Description | ||
|---|---|---|---|---|---|
| Identity | Required | Microsoft.SharePoint.PowerShell.SPUserPipeBind | Specifies the GUID, login name, or SPUser object of the user to be returned. The type must be a GUID of an existing user in the form, 1234-5678-9876-0987. | ||
| AddPermissionLevel | Optional | System.String[] | Specifies the permission level to add to the user. The value must be one of the following options: --Contribute Can view, add, update, and delete list items and documents. --Design Can view, add, update, delete, approve, and customize documents. --Full Control Has full control for all documents. --Limited Access Can view specific lists, document libraries, list items, folders, or documents when permissions are granted. --Read Can view pages and list items and download documents. | ||
| AssignmentCollection | Optional | Microsoft.SharePoint.PowerShell.SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
| ||
| ClearPermissions | Optional | System.Management.Automation.SwitchParameter | Deletes all assigned permissions from the user. If Clear and Add values exist, permissions are first cleared, and then new permissions are added. | ||
| Confirm | Optional | System.Management.Automation.SwitchParameter | Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters | ||
| DisplayName | Optional | System.String | Specifies the new display name of the user. The type must be a valid name. | ||
| | Optional | System.String | Specifies the new email address of the user. | ||
| Group | Optional | Microsoft.SharePoint.PowerShell.SPGroupPipeBind | Adds the user to an existing group in the given site. | ||
| IsSiteCollectionAdmin | Optional | none | Specifies whether to set the user as a site collection administrator. | ||
| PassThru | Optional | none | If not provided, indicates that this cmdlet has no output. If provided, this parameter indicates that the SPUser object for this user is to be returned. | ||
| RemovePermissionLevel | Optional | System.String[] | Removes the permission level from the user. | ||
| SyncFromAD | Optional | System.Management.Automation.SwitchParameter | If provided, specifies that user information will be synchronized from the user directory store. | ||
| Web | Optional | Microsoft.SharePoint.PowerShell.SPWebPipeBind | Specifies the name of the URL or GUID to be used as a scope. This parameter is not needed if the SPUser object is provided as the identity. The value must be an authentic URL, in the form http://server_name, or GUID, in the form 1234-5678-9807. | ||
| WhatIf | Optional | System.Management.Automation.SwitchParameter | Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
Detailed Description
The Set-SPUser cmdlet configures properties of an existing user.
Input Types
Return Types
------------------EXAMPLE-----------------------
Set-SPUser -Identity ‘Contoso\jdow’ –Web http:// test –AddPermissionLevel "Contributor"
This example sets a user (Contoso\jdow) to be a contributor on http://test.
Change History
| Date | Description |
|---|---|
| July 16, 2012 | Initial publication |

Note: