I am trying to create a site collection using powershell script but keep getting error even though I already created Managed Path I am referencing in cmdlet,
PS C:\Users\svc_spadmin> New-SPManagedPath "Teams" -WebApplication "http://share
point2010/"
Name Type
---- ----
teams WildcardInclusion
PS C:\Users\svc_spadmin> New-SPSite -URL "http://sharepoint2010/teams" -ownerAli
as "sp\svc_spadmin" -Template "STS#0"
New-SPSite : A site collection could not be created as the provided managed pat h does not exist. Change the URL to use an existing managed path or create the missing managed path prior to calling this command. At line:1 char:11 + New-SPSite <<<< -URL "http://sharepoint2010/Teams" -ownerAlias "sp\svc_spadm in" -Template "STS#0" + CategoryInfo : InvalidData: (Microsoft.Share...SPCmdletNewSite: SPCmdletNewSite) [New-SPSite], SPCmdletException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite
Edit
PS C:\Users\svc_spadmin> New-SpManagedPath -RelativeURL "MPOne" -WebApplication
"http://sharepoint2010/"
Name Type
---- ----
mpone WildcardInclusion
PS C:\Users\svc_spadmin> New-SPSite -URL "http://sharepoint2010/mpone/testsite"
-ownerAli "sp\svc_spadmin" -Template "STS#0"
New-SPSite : The URL '/mpone/testsite' is invalid. It may refer to a nonexiste nt file or folder, or refer to a valid file or folder that is not in the curren t Web. At line:1 char:11 + New-SPSite <<<< -URL "http://sharepoint2010/mpone/testsite" -ownerAli "sp\sv c_spadmin" -Template "STS#0" + CategoryInfo : InvalidData: (Microsoft.Share...SPCmdletNewSite: SPCmdletNewSite) [New-SPSite], SPException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSite