Sachin Shetty O365

Home » Uncategorized » Grant full control user policy with PowerShell: SharePoint

Grant full control user policy with PowerShell: SharePoint

Sachin

Mr Sachin Shetty

Lunch: 1 pm - 2pm
Dinner: M-Th 9 pm - 10pm, Fri-Sat:5pm - 1am

sachin.shetty10@icloud.com

Shetty

June 2014
M T W T F S S
    Mar »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Powershell
$webApplicationUrl = “http://server
$account = “domain\user”
$roleName = “FullControl”$webApplication = Get-SPWebApplication -Identity $webApplicationUrl
$account = (New-SPClaimsPrincipal -identity $account -identitytype 1).ToEncodedString()$zonePolicies = $webApplication.ZonePolicies(“Default”)
$policy = $zonePolicies.Add($account, $account)
$role = $webApplication.PolicyRoles.GetSpecialRole($roleName)
$policy.PolicyRoleBindings.Add($role)
$webApplication.Update()
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: