user911011
user911011

Reputation: 51

Powershell silent/unattended install sql server 2008

I have seen quite a few resources to silent install sql server 2008 with CMD line. Does anyone know how to silent install sql server 2008 with PowerShell and what should I configure? Thanks

Upvotes: 5

Views: 5278

Answers (2)

user847990
user847990

Reputation:

The silent install with SQL Server 2008 would work the same way whether you called it from the command line or from a PowerShell script. You would simply need to change around how you call the installer and pass the parameters for the configuration in PowerShell. It can get cumbersome calling external programs from PowerShell and passing the parameters to it as well. I believe you would use invoke-expression to call the command with the parameters. I honestly have not tried using PowerShell for this function since it works so well and easily in the dos prompt.

Upvotes: 3

Aaron Bertrand
Aaron Bertrand

Reputation: 280431

Given that from a command prompt you would run something like this:

[path]\setup.exe /Q /other_args

In PowerShell you could just call the same thing using something like this:

$cmd = "[path]\setup.exe /Q /other_args";
Invoke-Expression -command $cmd | out-null;

I haven't done this personally but that would be the first approach I would try if it were my task.

Upvotes: 2

Related Questions