4

I am using SP2013 single server dev environment. I use following scripts for creating web application and site collection. but when I browse to it, it says this site has not been shared with you. I am Administrator and logged on as Administrator and cleaned all cache services.

$appPoolAccount = "dev\sp_service"
New-SPWebApplication -ApplicationPool $appPool -ApplicationPoolAccount $appPoolAccount -Name $name -DatabaseName $dataBaseName -Url $url -Port $port -HostHeader $hostHeader -AuthenticationMethod "NTLM"

$domainAnduser = "dev\Administrator"
New-SPSite -Url $url -OwnerAlias $domainAnduser -Name $name -Template $template -Language 1033

It works if I do all above via CA.

1 Answer 1

4

If your web application is in Claims mode (uses Claims based authentication, CBA), you need to grant permission for username that is in claims format, like i:0#.w|dev\administrator. More info here.

2
  • Thank you, why it works when you create the web app and sc from CA?
    – Medes
    Mar 21, 2013 at 11:13
  • Because when your doing it from CA you resolve the inputted login names (sharepoint maps your input to an existing ad user) Mar 21, 2013 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.