Powershell DSC – Info 1625.系统策略禁止此安装

我正在使用Powershell所需的状态configuration来设置服务器。 服务器需要安装SQL客户端msi。 作为login用户,我可以点击msi,并安装它没有任何问题。 但是,当我尝试通过PowerShelll安装它

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

我得到以下错误。

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 

我不知道为什么政策会阻止PowerShell运行,但仍然允许我点击它来运行它。 有没有人有一个关于什么是挂断的想法? 任何帮助是极大的赞赏。

您需要指定IACCEPTSQLNCLILICENSETERMS = YES,以便在手动安装时明确指出您接受最终用户许可证的条款。

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

有关详情,您可以在这里查看 。