Install/OnPrem/XP/Scaled/xConnectCollection/Install-Collection.ps1
. "$PSScriptRoot\..\..\..\..\InstallParams.ps1" -Force Import-Module "$PSScriptRoot\..\..\..\..\..\SQL\SQL-Module.psm1" -Force Import-Module "$PSScriptRoot\..\..\..\..\..\Common\SSL\SSL-Module.psm1" -Force Import-Module "$PSScriptRoot\..\..\..\Install-Module.psm1" -Force $ErrorActionPreference = "Stop" $prefix = $global:Configuration.prefix $siteName = $global:Configuration.xConnect.collectionHostName $hostNames = @($siteName) $license = $global:Configuration.license $sqlServer = $global:Configuration.sql.serverName $sqlUser = $global:Configuration.sql.adminUsername $sqlAdminPassword = $global:Configuration.sql.adminPassword $sqlSitecorePassword = $global:Configuration.sql.sitecorePassword $installDir = $global:Configuration.xConnect.installDir $environment = $global:Configuration.xConnect.environment $logLevel = $global:Configuration.xConnect.logLevel $package = Get-ChildItem -Path "$SAFInstallPackageDir\*" -Include *collection.scwdp.zip* $sifConfiguration = GetSIFConfiguration -Name "xconnect-xp1-collection.json" -PackageName $package -DefaultValue "$PSScriptRoot\xconnect-xp1-collection.json" $clientCert = BuildSitecoreClientCertName -Prefix $prefix $serverCert = BuildSitecoreServerCertName -Prefix $prefix Write-Output "Install xConnect Collection started..." $dbs = @("MarketingAutomation", "Messaging", "Processing.Pools", "Xdb.Collection.Shard0", "Xdb.Collection.Shard1", "Xdb.Collection.ShardMapManager") DeleteDatabases -SqlServer $sqlServer -Prefix $prefix -Databases $dbs -Username $sqlUser -Password $sqlAdminPassword DeleteLogin -SqlServer $sqlServer -SqlLogin "$($prefix)_collectionuser" -Username $sqlUser -Password $sqlAdminPassword $sitecoreParams = @{ Path = $sifConfiguration Package = $package.FullName LicenseFile = $license Sitename = $siteName XConnectCert = $clientCert SqlDbPrefix = $prefix SqlAdminUser = $sqlUser SqlAdminPassword = $sqlAdminPassword SqlCollectionUser = "$($prefix)_collectionuser" SqlCollectionPassword = $sqlSitecorePassword SqlProcessingPoolsUser = "$($prefix)_processingpoolsuser" SqlProcessingPoolsPassword = $sqlSitecorePassword SqlMarketingAutomationUser = "$($prefix)_marketingautomationuser" SqlMarketingAutomationPassword = $sqlSitecorePassword SqlMessagingUser = "$($prefix)_messaginguser" SqlMessagingPassword = $sqlSitecorePassword SqlServer = $sqlServer XConnectEnvironment = $environment XConnectLogLevel = $logLevel SSLCert = $serverCert InstallDirectory = $installDir } Install-SitecoreConfiguration @sitecoreParams AddWebBindings -SiteName $siteName -HostNames $hostNames AddWebBindings -SiteName $siteName -HostNames $hostNames -SSLCert $serverCert Write-Output "Install xConnect Collection done." |