Automate Your Lab – Part 8 – SQL Server

Table Of Contents

In my lab I need a MS SQL Server for various reasons: Citrix XenDesktop, VMware Composer, VMware AppVolumes and other products. The SQL setup is quite slow and you have to wait in front of it as the installation and configuration is not separated. So I automated this nasty but needed component for my lab with a PowerShell script. Read more after the break.

This script will install the MS SQL Server with Windows and integrated authentication. I need Windows authentication for Citrix XenDesktop and integrated authentication for VMware Composer, this is why I prefer to enable both methods.


You need to specify three variables for the script to run:

  • SAPWD = Password for the sa user. If you don’t define it in the script the script will ask you for a password.
  • SQLSYSADMINACCOUNTS = AD user or group that will get SQL administrator.
  • PathToSetup = Path to the SQL Server setup file.

Leave a Reply

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