Sql server 使用PowerShell的SSIS目录和项目部署
我正在尝试使用power shell创建ssis目录 我犯了一个奇怪的错误。这是我正在运行的代码: 我把密码从 这就是我得到的错误:Sql server 使用PowerShell的SSIS目录和项目部署,sql-server,visual-studio,powershell,ssis,Sql Server,Visual Studio,Powershell,Ssis,我正在尝试使用power shell创建ssis目录 我犯了一个奇怪的错误。这是我正在运行的代码: 我把密码从 这就是我得到的错误: GAC Version Location
GAC Version Location
--- ------- --------
True v2.0.50727 C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Management.IntegrationServices\13.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Management.IntegrationServices.dll
New-Object : The term 'New-Object' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:13 char:18
+ $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $sqlConnectionSt ...
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-Object:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
有人遇到过这个问题吗?我丢失了一个文件吗
我试过这个方法,但没用。
我的powershell版本是4.0
当我手动执行此操作时,它会工作。我使用了完全相同的示例,没有任何问题(也是PS v4)。您是否尝试过退出PowerShell/ISE并重新打开?此SO链接--提到一个损坏的PS安装。我的PowerShell已损坏,不知道我是如何错过的:\n谢谢您的帮助。很高兴提供帮助,@Elad L。我认为损坏的PowerShell安装并不常见。
GAC Version Location
--- ------- --------
True v2.0.50727 C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Management.IntegrationServices\13.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Management.IntegrationServices.dll
New-Object : The term 'New-Object' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:13 char:18
+ $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $sqlConnectionSt ...
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-Object:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException