Install/OnPrem/Solr/PreInstalled/Create-SolrXConnectCoresViaHTTP.ps1

. "$PSScriptRoot\..\SolrParams.ps1" -Force
$ErrorActionPreference = "Stop"

Write-Output "Create xConnect Solr cores via HTTP started..."

$prefix = $global:Configuration.prefix
$configPath = "$PSScriptRoot\custom-solrHTTP.json"
$cores = @("xdb", "xdb_rebuild")

foreach ($core in $cores) {
    $solrParams = @{
        Path       = $configPath
        SolrUrl    = $SolrServiceURL
        CorePrefix = $prefix  
        CoreName   = $core
    }
    Install-SitecoreConfiguration @solrParams
}

Write-Output "Create xConnect Solr cores via HTTP done."