I try to use the Set-SPWebApplication to turn on anonymous access in SharePoint2010 web application using PowerShell, however it give me the following error (see the screenshot here):
Add SharePoint snappin
Add-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
$app = Get-SPWebApplication http://ybbest/ Set-SPwebApplication -Identity $app -AllowAnonymousAccess:$True -Zone Default
Set-SPWebApplication : A parameter cannot be found that matches parameter name 'AllowAnonymousAccess'. At C:\Users\Administrator\AppData\Local\Temp\1\5fa9c881-a962-44fa-8edc-4b5e4c4bb8d1.ps1:6 char:59 + Set-SPwebApplication -Identity $app -AllowAnonymousAccess: <<<< $True -Zone Default + CategoryInfo : InvalidArgument: (:) [Set-SPWebApplication], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.SharePoint.PowerShell.SPCmdletSetWebApplication