When you download and install Sitecore XP1, you need to install all of the certificates first. If you need to do this often like I do, this can be quite tedious. Stealing some code from the Single-Developer.ps1, this simple foreach wrapper is a huge time saver.
This assumes you already have the Sitecore Installation Framework installed(SIF) and can execute PowerShell scripts. Please use real certificates in production.
Enjoy!
###############################
# CreateAllSelfSignedCerts
# Prefix for sites
$Prefix
= "sitecore"
# Folder with the install files in it (specifically the createcert.json)
$SCInstallRoot
= "C:\Sitecore\9.1.1\XP1\"
$ContentDeliverySiteName
= "
$prefix
.cd"
$ContentManagementSiteName
= "
$prefix
.cm"
$ReportingSiteName
= "
$prefix
.rep"
$ProcessingSiteName
= "
$prefix
.prc"
$ReferenceDateSiteName
= "
$prefix
.refdata"
$IdentityServerSiteName
= "
$prefix
.identityserver"
$XP1MarketingAutomationSiteName
= "
$prefix
.ma"
$XP1MarketingAutomationReportingSiteName
= "
$prefix
.mareporting"
$XP1ClientCertificateName
= "
$prefix
.xconnect_client"
$XP1CollectionSitename
= "
$prefix
.collection"
$XP1CollectionSearchSitename
= "
$prefix
.search"
$XP1CortexProcessingSitename
= "
$prefix
.processingEngine"
$XP1CortexReportingSitename
= "
$prefix
.reporting"
$siteNames
=
$ContentDeliverySiteName
,
$ContentManagementSiteName
,
$ReportingSiteName
,
$ProcessingSiteName
,
$ReferenceDateSiteName
,
$IdentityServerSiteName
,
$XP1MarketingAutomationSiteName
,
$XP1MarketingAutomationReportingSiteName
,
$XP1ClientCertificateName
,
$XP1CollectionSitename
,
$XP1CollectionSearchSitename
,
$XP1CortexProcessingSitename
,
$XP1CortexReportingSitename
function
InstallCertificates {
Foreach
(
$site
in
$siteNames
) {
$certParams
= @{
Path = "
$SCInstallRoot
\createcert.json"
CertificateName =
$site
}
Install-SitecoreConfiguration
@certParams
-Verbose
*&>1 |
Tee-Object
".\CertInstall.${site}.log"
}
}
InstallCertificates
Leave a Reply