How do I enable anonymous login in SharePoint Server 2010?

3 Answers 3


Or, in Powershell:

$wa = get-spwebapplication http://{url}
$zone = [Microsoft.SharePoint.Administration.SPUrlZone]::Extranet
$i = $wa.IisSettings[$zone]
$i.AllowAnonymous = $true

$w = Get-SPWeb http://{url}
$w.AnonymousState = [Microsoft.SharePoint.SPWeb+AnonymousState]::On

$l = $w.Lists["Comments"]
$l.AnonymousPermMask64 = {BasePermissions as appropriate}
  • Just to be safe, it is a good idea to use Start-SPAssignment / Stop-SPAssignment with disposable SharePoint objects: Start-SPAssignment -Global <NEWLINE> $w = Get-SPWeb http://{url} <NEWLINE> #more code here <NEWLINE> Stop-SPAssignment -Global Jun 28, 2010 at 13:18
  • When processing many SPWeb's, I agree. Most dev's that I teach find the SPAssignment model confusing, so I leave that out of snippets that I post. [Closing the PowerShell console will clean-up memory ;)] Jun 28, 2010 at 16:12
  • Yeah thats what i ment with just to be safe. You never know where the code is going to run, and you never now when your IT pro will close that console again ;-) Global assignment collections is simple, but SemiGlobal can get confusing when you start piping it to Get-SPWeb :-) Jun 28, 2010 at 18:59
  • The AnonymousState enum is written as [Microsoft.SharePoint.SPWeb+WebAnonymousState]::On in 2013 Oct 14, 2014 at 9:56

You can check out an article here


answer is here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy