首页 > 解决方案 > Powershell Remoting:访问域资源

问题描述

我在远程运行我的 PS cmdlet 时遇到问题。Cmdlet 是用 C# 编写的,并使用 Windows Auth 执行与 SQL Server 数据库的连接。当我从远程机器(机器 B)运行它时 - 一切都很好,但是当我尝试远程运行它(从机器 A)时 - 它无法连接到数据库。在这两种情况下,我都在同一个域帐户下运行它(任务管理器还显示机器 B 上的 powereshell.exe 和 wsmprovhost.exe(remote) 都使用同一个帐户)。

我应该配置设置 PSSession 有什么特别的吗?

标签: powershellpowershell-remoting

解决方案


你能分享错误信息吗?是的,有一些用于设置 PSSession 的预配置,我建议您查看以下链接:

https://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/ https://theitbros.com/run-powershell-script-on-remote-computers/


推荐阅读