11 Ocak 2012 Çarşamba

Changing Authentication type of a Web Application in SharePoint 2010


Changing Authentication type of a Web Application in SharePoint 2010


As you may experience, if you set up your Web App as Classic but you need Forms Authentication (using username-password to authorize people from outside network)
you need to change the authentication type to Claims based authentication.

In order to do that, you need the SP 2010 Management Shell.
You can start it from:
(Server) Start - All Programs - Microsoft SharePoint 2010 Products - SharePoint 2010 Management Shell run as Administrator


Type the commands:


$WebAppName = “http://sharepoint”
$account = "DOMAIN\Administrator"
$wa = get-SPWebApplication $WebAppName
Set-SPwebApplication $wa –AuthenticationProvider (New-SPAuthenticationProvider) –Zone Default

$wa = get-SPWebApplication $WebAppName
$account = (New-SPClaimsPrincipal -identity $account -identitytype 1).ToEncodedString()

$zp = $wa.ZonePolicies("Default")
$p = $zp.Add($account,"PSPolicy")
$fc=$wa.PolicyRoles.GetSpecialRole("FullControl")
$p.PolicyRoleBindings.Add($fc)
$wa.Update()

$wa = get-SPWebApplication $WebAppName
$wa.MigrateUsers($true)

Now you are able to use claims based authentication.


Source:
http://technet.microsoft.com/en-us/library/gg251985.aspx

Hiç yorum yok:

Yorum Gönder