Tag: sql

Create SQL Server User and Add Role via Powershell

Create SQL Server User and Add Role via Powershell

I found a need to create a new SQL Server user, but wanted to automate it. The following script seemed to do the trick for me. You’ll have to install two modules, but the script will take care of that for you as well. Set-PSRepository -Name PSGallery -InstallationPolicy Trusted Install-Module sqlserver -Confirm:$False Install-Module dbatools -Confirm:$False …

+ Read More

How to Perform a Silent Install of SQL Server (or SQL Express)

How to Perform a Silent Install of SQL Server (or SQL Express)

I needed to install SQL Server Express 2016 silently, but the documentation out there wasn’t the best. The trick to installing this silently is to create a ConfigurationFile.ini and then reference that during the install. Luckily for us, the installer creates the Configuration File for us. Download SQL Server I’ve only tested this using the …

+ Read More