I’ve become a huge fan of Chocolatey. I historically have a Linux developer background and I got spoilt by
apt so it always had me upset that there was no unified way in Windows of installing and keeping track of various utilities a developer would find useful in day to day life.
I had some experience in Linux shell scripting in my past, but really got into it while building data cleansing scripts using tools like curl, grep and sed for an e-commerce startup I used work for. While I did recognize immediately how powerful mastery of Powershell would offer a Windows developer like myself, it was only in the last year or so I have had the opportunity for field work to hone this (and I am still, by no means, a master of this). I hope soon to have some deeper articles on Powershell, especially now that Powershell Core is maturing and makes it a contender for cross-platform scripting in a manner that may take on the likes of traditional shell scripting shells like
For now though, let’s start at the beginning of any developer’s journey: Getting your dev workstation setup. If you’re anywhere close to my use case, where I use a Mac but spin up new Windows VMs frequently to either isolate different clients’ VPN requirements or keep their streams of work separate, this can be a task in repetition.
Thankfully there’s a simple script I wrote, that eases this into one Powershell script. The initial code I sanitised for release is simple enough to paste in this article, but I plan to update it for more complex developer environment requirements, so you should clone my EasyDevWorkstation Github repository to get these updated scripts later on.
The following lines of script, taken from this repo, when run from an administror-mode Powershell prompt, will do the following:
- Set the Execution Policy of the system to
RemoteSignedto allow the installation of Chocolatey, and in turn allow Chocolatey scripts to install software
- Download and Install
- Install via Chocolatey the following
Git, because you need version control from the beginning
- Google Chrome browser, because we’re not all Edge and IE fans
- The latest available version of
Powershell(in case you are running an older OS like Windows Server 2008 R2, Chocolatey I think requires at least one version higher than the base install version)
- Visual Studio code, which has been growing in popularity (and extensions) to allow really simple to really powerful scenarios for coding solutions, and has good Git integration
- SQL Server Management Studio, because most common developer scenarios require connecting to SQL Server databases at some point.
Here’s the script:
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
choco install -y --allow-empty-checksums git GoogleChrome powershell visualstudiocode sql-server-management-studio