“Done in 7 minutes” -SQL Server 2019 Install2 min read

This blog comes to you from the home office after three days of caring for my sick six-year-old son. Yay for stomach bugs…

Have you ever needed to install SQL Server for a quick test of a feature, stand up a fresh instance for a team, or automation?

Like anything with technology, there are multiple ways to accomplish something. Sure, you could track down the DVD, stick it in the server and go through the Setup.  Oh, maybe if the year was 2015. These days you have the ISO stored on a network share, mount it to the VM, and run Setup.

I choose to build PowerShell scripts to accomplish this type of request. Recently I decided to perform some time metrics to see how quickly I could get an instance ready for a user.

My demo will walk through using dbatools.io and PowerShell to perform two different types of installations of SQL Server 2019.

Using the Install-DbaInstance function, I performed an installation using splatting and a configuration.ini file.

Demo One – Splatting

Above, you can see the script executed utilizing the PowerShell Splatting format.

  1. Set the server name that you want to install SQL Server on.
  2. To optimize the installation, it is best to slipstream the patches after the installation, so second, you will point the installation process to the location of your patches.
  3. Finally, the parameters can be assigned for each needed installation value.

Notice how I started and ended the script with the Get-Date command to keep track of the time it takes from start to finish.

For this installation, the timing results are as follows:

Install Start – 1:50:19 PM

Install Complete – 1:57:47 PM

Total Time – 7 minutes

Demo Two – Configuration.ini File

This demonstration is for you if you have a pre-configured configuration.ini file that you simply change settings in.

Let us see how this type of installation differs when comparing the installation times.

Install Start – 1:38:49 PM

Install Complete – 1:47:01PM

Total Time – 9 minutes


We achieved automated installs with both types of SQL Server installation options, fully patched in less than 10 minutes.

2 Replies to ““Done in 7 minutes” -SQL Server 2019 Install2 min read

  1. I’m having trouble with this when trying to install multiple features like below

    $Features = “Engine, FullText, Connectivity, BackwardsCompatibility, IntegrationServices”

    I’m getting the following error.
    Install-DbaInstance : Cannot validate argument on parameter ‘Feature’. The argument “Engine, FullText, Connectivity, BackwardsCompatibility,
    IntegrationServices” does not belong to the set “Default,All,Engine,Tools,Replication,FullText,DataQuality,PolyBase,MachineLearning,AnalysisServic
    ,Connectivity,ReplayController,ReplayClient,SDK,BIDS,SSMS” specified by the ValidateSet attribute. Supply an argument that is in the set and then
    try the command again.
    At line:28 char:21
    + Install-DbaInstance @installparams
    + ~~~~~~~~~~~~~~
    + CategoryInfo : InvalidData: (:) [Install-DbaInstance], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Install-DbaInstance

    Have you run into the same issues before?

    1. It looks like it was a syntax error. I was able to install multiple features by using separate strings delimited with commas.

      eg. ‘Engine’,’FullText’,’Connectivity’,’BackwardsCompatibility’,’IntegrationServices’

Leave a Reply

Your email address will not be published. Required fields are marked *