Pipelines/Steps/Install/OnPrem/Sitecore/Prerequisites/9.0/Install-Prerequisites.ps1
$ErrorActionPreference = "Stop" $requiredSIFVersion = (Get-Module -Name SitecoreInstallFramework).Version $sifModules = Get-Module -Name SitecoreInstallFramework -ListAvailable $installSIFPrerequisitesVersion = $true if ($null -ne $sifModules) { foreach ($module in $sifModules) { if ($module.Version -eq $SAFSitecore91SIFVersion) { $installSIFPrerequisitesVersion = $false } } } if ($installSIFPrerequisitesVersion) { try { Install-Module -Name SitecoreInstallFramework -RequiredVersion $SAFSitecore91SIFVersion -Repository "SitecoreGallery" -AllowClobber -Force } catch { Write-Warning "SAF was not able to install the Prerequisites SIF version $SAFSitecore91SIFVersion. Please, install it manually..." Start-Sleep 5 } } Get-Module -Name SitecoreInstallFramework | Remove-Module -Force Import-Module -Name SitecoreInstallFramework -RequiredVersion $SAFSitecore91SIFVersion -Force -Global $sifConfiguration = "$PSScriptRoot\Prerequisites.json" Install-SitecoreConfiguration -Path $sifConfiguration Get-Module -Name SitecoreInstallFramework | Remove-Module -Force Import-Module -Name SitecoreInstallFramework -RequiredVersion $requiredSIFVersion -Force -Global |