powershell - Powershell Remoting:访问域资源
问题描述
我在远程运行我的 PS cmdlet 时遇到问题。Cmdlet 是用 C# 编写的,并使用 Windows Auth 执行与 SQL Server 数据库的连接。当我从远程机器(机器 B)运行它时 - 一切都很好,但是当我尝试远程运行它(从机器 A)时 - 它无法连接到数据库。在这两种情况下,我都在同一个域帐户下运行它(任务管理器还显示机器 B 上的 powereshell.exe 和 wsmprovhost.exe(remote) 都使用同一个帐户)。
我应该配置设置 PSSession 有什么特别的吗?
解决方案
你能分享错误信息吗?是的,有一些用于设置 PSSession 的预配置,我建议您查看以下链接:
https://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/ https://theitbros.com/run-powershell-script-on-remote-computers/
推荐阅读
- python - 我有一些列表,我已经合并了它们,但是我怎样才能按降序排列值并将其作为 STD 呢?
- sql - SQL JOIN COUNT 和 GROUP BY
- python - 如何在 Kafka 中发布字典?
- java - Generate classes from Postgress database with multiple schemas using Cayenne
- cron - crontab 重启作业重启多次而不是一次
- spring-mvc - 通过使用字段名称在 JSP 中获取值
- node.js - Nodejs:在类方法中的异步函数中访问“this”
- android - 折叠工具栏标题在展开时会忽略 textStyle 和 fontStyle
- java - 如何在android中动态设置颜色透明?像 10% 20% 到 100%
- rust - 在 rust 中,如何定义一个全局变量/常量,其值是函数的结果?