Export (0) Print
Expand All
0 out of 3 rated this helpful - Rate this topic

Set-SPUser

 

Applies to: SharePoint Server 2013 Enterprise, SharePoint Foundation 2013

Topic Last Modified: 2014-03-04

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>]]

The Set-SPUser cmdlet configures properties of an existing user.

 

Parameter Required Type Description

Identity

Required

Microsoft.SharePoint.PowerShell.SPUserPipeBind

Specifies the login name, or SPUser object of the user to be returned.

The type must be the login name of an existing user in the form, domain\user.

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.

NoteNote:
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

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.

Email

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

------------------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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.