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.