سؤال

I am trying to create a new site collection with powershell in the root path http://mysite/search/

    $siteName = "Search";
    $webAppUrl = "http://sharepoint";
    $siteUrl = "$webAppUrl/$siteUrl";

    New-SPSite -Url $siteUrl -OwnerAlias $ownerAlias -SecondaryOwnerAlias $secondaryOwnerAlias -ContentDatabase $databaseName -Template $template -Name $siteName;

I get the error below:

New-SPSite : A site collection could not be created as the provided managed path does not exist.

هل كانت مفيدة؟

المحلول

If you are looking to create an site collection, you need to create an explicit managed path for "/search". In central administration, under the manage web applications screen, highlight the web application, then select managed path.

Create an explicit managed path called "/search" and try your powershell script again.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top