Windows 7 工作站 POSH 3.0 SS 2012 SP1
摘要:
Developer 1 无法运行 Invoke-SQLCmd
Developer 2 安装类似的 SS 客户端工具可以运行 Invoke-SQLCmd
Developer 1 无法运行 Import-Module SQLPS
当我尝试从笔记本电脑运行查询时,如下所示:
Invoke-sqlcmd -ServerInstance <ServerName> -Query "Select top 10 * from <SomeTable>;"
我收到以下错误:
Invoke-sqlcmd : The 'Invoke-sqlcmd' command was found in the module 'SQLPS',
but the module could not be loaded. For more information, run 'Import-Module
SQLPS'.
另一个开发人员可以成功运行该命令,我们都有本地
由于显而易见的原因,我无法在我的机器上运行 Import-Module sqlps - ExecutionPolicy 受到限制。
我不确定为什么其他开发人员机器允许查询,而我的机器不允许。这是 SQL 客户端安装问题吗?