Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SharePoint PowerShell site permissions

I want to give a Domain User SharePoint permissions on a Site. The peoplepicker in SharePoint found the user and i can add the user in the Browser to the Site. But when I use PowerShell, the User is not in the permission list on the SharePoint GUI.

PS: New-SPUser -UserAlias "test\TestUser2" -PermissionLevel Contribute -web http://test.sharepoint.de/site/page

PS:
UserLogin            DisplayName         
---------            -----------         
TEST\testuser2       TestUser2  

also not working:

Get-SPWeb "http://test.sharepoint.de/site/page" | New-SPUser –UserAlias "test\TestUser2" -PermissionLevel Contribute
like image 340
LaPhi Avatar asked Jan 28 '11 16:01

LaPhi


1 Answers

It should be this: Set-SPUser -Identity 'domain\name' -Web http://sp2test/site -AddPermissionLevel Read

like image 67
dusan Avatar answered Sep 30 '22 07:09

dusan