On this post I would like to share something that I’m currently working,
I think that the Infrastructure guys will love it,
But I stated working on that, because I really don’t like to install my environment step by step, again and again,
So it can save some time to setup a development environment when you get a new pc.
The idea is install all things that are requirement for Sitecore.
So lets start with this simple post about pre-requirements for PowerShell itself.
You can download the file form here if you prefer:
0-Powershel Pre-requisites.ps1
And I will try to explain the code here, if you have some question about it you can comment bellow and I will answer it asap
- First you will need to enable script execution
you can find more information about script execution policy here
#PowerShell modules need to enable script execution
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force;
- Second you need to install Chocolatey, basicly it “is a package manager for Windows (like apt-get or yum but for Windows). It was designed to be a decentralized framework for quickly installing applications and tools that you need. It is built on the NuGet infrastructure currently using PowerShell as its focus for delivering packages from the distros to your door, err computer”, I use this to install softwares and tools that we need to install, like SQL Server for exemple, you can find more information here
#Chocolatey
write-host “Installing Chocolatey module”
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))
- “Chocolatey makes installing software very easy with no user intervention. Boxstarter enhances Chocolatey’s functionality and provides an environment that is optimized for installing a complete environment on a fresh OS install, as well as some other specific scenario”, so I use this to do changes on windows features (https://boxstarter.org/WinConfig) that you will se in the next post.
#BoxStarter depends of Chocolatey
write-host “Installing Boxstarter module”
CINST Boxstarter -y
- It can be optional, but I like to have it, I have the intent to use this in my future scripts, so, its enable the NuGet features like on VS, you can install modules, create modules and a lot of other things
#Nuget
write-host “Installing NuGet module”
Install-PackageProvider -Name NuGet -Force
- We need this one to install Sql server, and to configure it, import database and bases and things that Sitecore installation script will do
#Sql Server module
write-host “Intalling Sql Server module”
Install-Module -Name SqlServer -AllowClobber
choco install ssdt17
- And Finally, Sitecore Installation Framework, and I think that this one don’t need any explanation, its all about Sitecore 9
#SIF
Register-PSRepository -Name SitecoreGallery -SourceLocationhttps://sitecore.myget.org/F/sc-powershell/api/v2
Install-Module SitecoreInstallFramework -Force
Update-Module SitecoreInstallFramework
#confirm installation
Get-Module SitecoreInstallFramework –ListAvailable
If you understood and completed all script steps until here, you are ready for the next step that will be install the tools and software that we will need.



