How to Install SQL Server Express Version Automatically through PowerShell

Introduction

This article introduces the steps on how to install Express SQL Server via PowerShell.
 
Step1. Access the Windows server via RDP.
Step2. Open Windows PowerShell ISE.
Step3. Run the script.
Step4. Check if the installation is successful.
 

1. Access the Windows server via RDP

About how to access a Windows server via RDP, please take a look at How to access Windows VPS/Server via RDP .
 

2. Open Windows PowerShell ISE

Enter ise in the Search box. And then click Windows PowerShell ISE to open it.
 
 

3. Run the script

Copy the following script to the PowerShell ISE command line and then press Enter to run the script.
 
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;IEX (New-Object Net.WebClient).DownloadString('https://gitlab.cloudclusters.net/public_package/dbm-script/raw/master/InstallSQLServer_Express.ps1'); 
 
 
In the pop-up window, enter the SQL Server sa password and select the SQL Server Version you want to install. Then, click OK.
 
 
The entire installation process is fully automatic, so you don't need to do anything else. It may take up to 60 minutes to complete the installation.
Please do not close any windows during installation.
 
 
 
 

4. Check if the installation is successful

Once the PowerShell ISE window prints "Install Complete!", you can close the window and start using SQL Server.
 

Add Feedback