Powershell:无法加载Microsoft.SqlServer.Management.Utility.dll

时间:2016-04-26 06:29:02

标签: powershell

我的机器上没有安装Sql Server,但我需要SQLPS模块。所以我安装了三个msi以下。

Microsoft® System CLR Types for Microsoft® SQL Server® 2012 (SQLSysClrTypes.msi)
Microsoft® SQL Server® 2012 Shared Management Objects (SharedManagementObjects.msi)
Microsoft® Windows PowerShell Extensions for Microsoft® SQL Server® 2012 (PowerShellTools.ms

然后我尝试导入SQLPS模块,但是我收到了错误

Importing SQLPS module.
The assembly 'Microsoft.SqlServer.Management.Utility' was not loaded because no assembly with that name was found. 

我验证了,我发现这个组合存在于C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies下,但不在GAC下。 所以请你告诉我我做了什么?我没有得到任何线索。我应该将程序集复制到GAC吗?

1 个答案:

答案 0 :(得分:0)

尝试安装本机客户端吗?

  

Microsoft®SQLServer®2012Native Client(sqlncli.msi)