Created
November 21, 2019 15:48
-
-
Save MartinMiles/33625c8ba16469b75e7af37c25e983a2 to your computer and use it in GitHub Desktop.
Installs recent version of Sitecore Install Framework along with required dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$SitecoreModuleName = 'SitecoreInstallFramework' | |
$SitecoreRepositoryUrl = 'https://sitecore.myget.org/F/sc-powershell/api/v2' | |
$SitecoreRepositoryName = 'SCGallery' | |
# Install NuGet package repository | |
Install-PackageProvider "NuGet" -MinimumVersion 2.8 -Force | Out-Null | |
# Install Sitecore's powershell gallery | |
$SCGallery = Get-PSRepository $SitecoreRepositoryName -ErrorAction SilentlyContinue | |
If ($null -eq $SCGallery) { | |
Register-PSRepository $sitecoreRepositoryName $SitecoreRepositoryUrl -InstallationPolicy "Trusted" | Out-Null | |
} | |
# Install Sitecore Installation Framework | |
$SIF = Get-Module $SitecoreModuleName -ListAvailable | |
If ($null -eq $SIF) { | |
Install-Module $SitecoreModuleName -Repository $SitecoreRepositoryName -Force | Out-Null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment