Skip to content

Instantly share code, notes, and snippets.

@MartinMiles
Created November 21, 2019 15:48
Show Gist options
  • Save MartinMiles/33625c8ba16469b75e7af37c25e983a2 to your computer and use it in GitHub Desktop.
Save MartinMiles/33625c8ba16469b75e7af37c25e983a2 to your computer and use it in GitHub Desktop.
Installs recent version of Sitecore Install Framework along with required dependencies
$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