2

I'm using the Powershell Desired State Configuration to set up a server. The server needs a SQL Client msi installed. As a logged in user, I'm able to click the msi, and install it with no problems. However, when I attempt to install it through PowerShelll

C:\Windows\system32\msiexec.exe /i "C:\Users\Djad\Desktop\sqlncli.msi" /quiet /log C:\Users\Djad\Desktop\sqllog.txt

I get the following error.

MSI (s) (A4:4C) [22:43:59:356]: Product: Microsoft SQL Server 2012 Native Client  -- Installation failed.
MSI (s) (A4:4C) [22:43:59:372]: Windows Installer installed the product. Product Name: Microsoft SQL Server 2012 Native Client. Product Version: 11.0.2100.60.    Product Language: 1033. Manufacturer: Microsoft Corporation. Installation   success or error status: 1625.

Info 1625. This installation is forbidden by system policy. Contact your system administrator.
C:\Users\Djad\Desktop\sqlncli.msi

I'm not sure why policy would prevent the powershell from running, but still allow me to click it to run it. Does anyone have an idea of what the hangup could be? Any help is greatly appreciated.

Black Dynamite
  • 523
  • 2
  • 5
  • 16

1 Answers1

3

You need to specify IACCEPTSQLNCLILICENSETERMS=YES, to explicitly indicate that you accept the terms of the end user license as you manually install it .

msiexec.exe /i "C:\Users\Djad\Desktop\sqlncli.msi" /qn IACCEPTSQLNCLILICENSETERMS=YES /log "C:\Users\Djad\Desktop\sqllog.txt"

For details you may check here.

Elton Ji - MSFT
  • 281
  • 1
  • 3
  • You've provided a one liner with zero explanation of _how_ it addresses the OP's question. Please consider an edit to explain your use of the property and link to some documentation that details its requirement. – jscott Oct 07 '16 at 04:19
  • @jscott Thanks JScott. I'm kind of upset that the "Accept license terms" switch isn't listed somewhere more prominently. – Black Dynamite Oct 07 '16 at 14:36
  • 1
    @FlexFiend You can get a full list of switches with Orca – Colyn1337 Oct 08 '16 at 07:45