First, make sure your site (web application) does not have the CBA enabled.
Go to Central Administration >> Manage web applications and click on the site you’re planning to enable CBA.
Under Web Applications tab click on the Authentication Providers icon and a small window will pop-up. Under Default you should see Windows.
Next, create a PowerShell (.ps1) file using Notepad and paste the following code into it:
Open SharePoint 2010 Management Shell, make sure you’re under C: (use CD.. to move under C:)and type or Copy and right-click Paste this command ./SetCB.ps1
Hit Enter and after few seconds your SharePoint site should have Claims Based Authentication enabled.
Repeat the previous steps to check if your site has CBA enabled, Central Administration >> Manage web applications and click on the site, click on the Authentication Providers icon and under Default you should see now Claims Based Authentication.
To revert back to Classic mode authentication (disabled Claims Based Authentication) just change the 1 to a 0:
Go to Central Administration >> Manage web applications and click on the site you’re planning to enable CBA.
Under Web Applications tab click on the Authentication Providers icon and a small window will pop-up. Under Default you should see Windows.
Next, create a PowerShell (.ps1) file using Notepad and paste the following code into it:
$setcba = Get-SPWebApplication "http://YourSiteURL"
$setcba.UseClaimsAuthentication = 1;
$setcba.Update()
Give it a name, like SetCB.ps1 and save in under C: on your SharePoint 2010 server.
|
Open SharePoint 2010 Management Shell, make sure you’re under C: (use CD.. to move under C:)and type or Copy and right-click Paste this command ./SetCB.ps1
Hit Enter and after few seconds your SharePoint site should have Claims Based Authentication enabled.
Repeat the previous steps to check if your site has CBA enabled, Central Administration >> Manage web applications and click on the site, click on the Authentication Providers icon and under Default you should see now Claims Based Authentication.
To revert back to Classic mode authentication (disabled Claims Based Authentication) just change the 1 to a 0:
$setcba = Get-SPWebApplication "http://YourSiteURL" $setcba.UseClaimsAuthentication = 0; $setcba.Update() |
No comments:
Post a Comment