I wanted to do a content deployment to a new farm and wanted to create a new blank site using powershell:
New-SPSite -Url http://<servername>:8080/sites/test –OwnerEmail <email address> –OwnerAlias domain\<account>
. While trying to create a new site, I got the following error:
New-SPSite : User cannot be found.
At line:1 char:2
+ New-SPSite -Url http://<servername>:8080/sites/tes …
+ CategoryInfo : InvalidData: (Microsoft.Share…SPCmdletNewSite:SPCmdletNewSite) [New-SPSite], SPException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
I was initially stumped. Only the other day I had created a new site successfully, why would it fail now?
I tried creating a new site using Central Administration and it still failed with error “Sorry, something went wrong User cannot be found”:
But, I was able to create a new site collection on another farm using the same account. Also I was able to create a new site collection on on a new test web application on the problem server with this user account.
Turns out the issue was due to enabling Trusted Identity Provider (STS) for Forms login for external users on an extended site. For some reason, after enabling STS, SharePoint was failing to identify Windows NT id .
So, my best guess is, with STS enabled SharePoint wants to resolve users in the format i:0#.w|domain\account and this creates problem. (btw, I had already tried creating a new site using
New-SPSite -Url http://<servername>:8080/sites/test –OwnerEmail <email address> –OwnerAlias i:0#.w|domain\account
But that did not work either.
But what I did find was that if I disabled the Trusted Identity provider by unchecking the box, I could create a new site without error.