0

I've been looking for a way to create a SQL Server instance and then create and configure a database via PowerShell. I have found ways to create databases, but is there a way to create SQL Server instances?

3
  • "Create an instance" means installing SQL Server again (from the installation media) - with a new, unique instance name. This can be done silently, by providing all the necessary answers in an "options file" Commented Jan 2, 2020 at 16:51
  • This is what I want. I want to install a new instance via powershell. Could you possibly provide a link to somewhere where I can get this information? Commented Jan 2, 2020 at 16:54
  • See learn.microsoft.com/en-us/sql/database-engine/install-windows/… and learn.microsoft.com/en-us/sql/database-engine/install-windows/… - or just Google for it .... Commented Jan 2, 2020 at 16:57

2 Answers 2

2

As long as you have a Configuration.ini file created, whether it's from a previous manual install or if you've generated it yourself, you can easily install SQL server as you want with the options defined in Configuration.ini:

Setup.exe /ConfigurationFile=MyConfigurationFile.INI
Sign up to request clarification or add additional context in comments.

Comments

0

Have you taken a look at SqlServerDsc?

After that https://dbatools.io/ is pretty much the standard for all your SQL PowerShell needs.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.