Easy installation media download for busy SharePoint engineers

SubPointSupport
SubPointSolutions
Published in
5 min readMar 5, 2019

Downloading and managing installation media is not fun. Whether it is development, test or lab environment, dozens of ISO images, patches, updates and language packs have to be downloaded prior to setting up you SharePoint, SQL or even bare Windows setup. Sometimes, it might be up to fifty files to move around!

We have had this problem too, and developed a PowerShell module which downloads over 120 installation files for Windows, SharePoint, SQL, CRM Servers for you. It comes with a command line interface, JSON driven configurations, built-in checksum validation and a few more nice features. Being written in PowerShell 6, it works on Windows and MacOS platforms. Altogether, it provides an enjoyable experience and takes away the complexity of downloading and organising installation media for your SharePoint and Windows environments. Here is how it looks like:

Introducing InvokeUplift module

Getting started is super-easy. Just grab the latest InvokeUplift module from the PowerShell gallery. Note that pwsh should be used all the time as this is a PowerShell 6 module.

pwsh
Install-Module -Name InvokeUplift

Once done, validate install by running the following:

# don't forget to switch to pwsh 
pwsh

# default run, version and help
invoke-uplift
invoke-uplift version
invoke-uplift help

Listing installation medial

InvokeUplift knows more than 120 installation media files. It covers Windows 2016 ISO, patches, SQL Server ISO images and updates, SharePoint 2013 and 2016 trial ISOs, services packs and more. You can list available files using list command:

invoke-uplift resource list

It also supports wildcard matching, so you can list only SharePoint relates resource as follows:

invoke-uplift resource list ms-sharepoint2016
invoke-uplift resource list ms-sharepoint2016-lang-pack
invoke-uplift resource list ms-sharepoint2016-update

Similar for Windows 2016, SQL Server, and Visual Studio:

invoke-uplift resource list ms-win-2016-iso
invoke-uplift resource list ms-win2016-lcu
invoke-uplift resource list ms-win2016-ssu
invoke-uplift resource list ms-sql-serverinvoke-uplift resource list ms-visualstudio-

There more tools available, such as HashiCorp’s Vagrant and Packer, ReSharper, and more — just play around.

Downloading installation media

Now that we know the names of the file resources, it is super-easy to download them. Just use the resource name or wildcard with the download command:

# download windows 2016 iso
invoke-uplift resource download ms-win-2016-iso-x64-eval
# download SQL Server 2016 RTM
invoke-uplift resource download ms-sql-server2016-rtm
# download SharePoint 2016 RTM ISO
invoke-uplift resource download ms-sharepoint2016-rtm
# wildcard, get all SharePoint 2016 updates of year 2018
invoke-uplift resource download ms-sharepoint2016-update-2018

By default, invoke-uplift downloads files into uplift-local-repository folder within the directory where it was run. This can be changed by using -r or -repository option:

# download resource into a local folder
invoke-uplift resource download 7z-1805-x64 -r c:/my-files-repository

# download resources into a local folder
invoke-uplift resource download 7z-1805-x64 -repository c:/my-files-repository

More options — force downloading, debug and links validation

By default, files are downloaded with checksum verification. Assuming that the first download was successful, consequent downloading won’t download anything. That makes the downloading experience not only fast but also predictable — files are downloaded rightly, without being dropped in the middle.

That said, sometimes we need to re-download files overriding existing ones. It can be done with -f or -force flag:

# -f or -force flag usage
invoke-uplift resource download 7z-1805-x64 -r c:/my-files-repository -f
invoke-uplift resource download 7z-1805-x64 -repository c:/my-files-repository -force

By default, invoke-uplift reports only important information. Debug trace can be enabled with -d or -debug flag:

# -d or -debug flag usage
invoke-uplift resource download 7z-1805-x64 -r c:/my-files-repository -f
invoke-uplift resource download 7z-1805-x64 -repository c:/my-files-repository -force

Finally, resource validate-uri command comes handy while ensuring that remote URLs are still alive. A simple HEAD request will be run against remote URL expecting 200 response. Same resource name or wild card value should be passed into the command:

# -d or -debug flag usage
invoke-uplift resource validate-uri 7z-1805-x64
invoke-uplift resource validate-uri 7z-

Local repository structure

invoke-uplift uses a naming convention while organising downloaded files. Local file repository always looks as follows:

/resource-name
/cache
/download-staging
/latest

Initially, file is downloaded into /download-staging folder. If checksum passes, then the file is moved into /latest folder. Such stages download workflow prevents incorrectly downloaded files overwriting, corrupting current “latest”. Only checksum validated files make it forward.

Moreover, the /latest folder always contains two more files:

  • __metadata.uplift.json
  • {filename}.sha265

These files provide a machine-readable input so that external tools can consume and validated downloaded files.

As you can see, while invoke-uplift does not solve all the problems, it surely solves one problem nicely.

What do we use it for?

Initially, we struggled with file downloading while building golden images for our development and integration environments. Downloading and managing installation media was a manual, boring and error-prone process.

Nowadays, invoke-uplift is an important part of several other projects — Packer images and Vagrant boxes for SharePoint engineers. Every single bit is under CI/CD pipeline, complexity is covered and exposed via single line command, we almost forgot how to download things via browser, and so should you! Moreover, invoke-uplift works under MacOS streamlining Windows/Macbook experience.

What else can you do?

Once you built up your local file repository, here are a few things you can do:

  • Easy expose via shared folders, nodejs http-server , or any web server
  • Sync with Azure/Amazon Cloud storage
  • Build a CI/CD pipeline to pre-build your Azure/Amazon Cloud storage
  • Run local http-server and easily share files with Packer/Vagrant builds

Further reading

There are a few more features which we’ll cover later, but here are a few more links to follow up:

If you find this useful, drop us a line or give feedback on the GitHub. We always keen to learn more and improve on the feedback.

--

--

SubPointSupport
SubPointSolutions

Easy SharePoint automation for developers and engineers. Provision SharePoint artifacts and deliver SharePoint infrastructure with confidence, sanity and joy.