我无法使用 C# 使用 Kerberos 身份验证与交换服务器进行远程会话
I can not make remote session to the exchange server using c# using Kerberos authentication
我在同一个本地网络中有 2 台机器,但在不同的域中。
其中之一我有交换服务器。当我尝试从机器 A 远程连接到 powershell 到机器 B(这里是交换服务器)时。
如果我使用使用 Kerberos 身份验证的 powershell 控制台,我可以建立和导入远程会话。但问题是,当我使用 c# 方法时,它在身份验证上失败,无论是使用 WSManConnectionInfo class 还是使用 powershell.AddScript(...) ,我把相同的脚本 运行 放在powershell 控制台。
有什么想法吗?
实际上,问题不仅在于当我尝试在 c# 中通过 WSManConnectionInfo class 进行连接时,我也无法使用 powershell 控制台进行远程连接。
我很困惑,因为有时我能够 运行 远程连接,所以我错误地认为代码可以从 powershell 控制台运行,而不是从 c# 运行。
最后的问题是,出于某种原因,Kerberos 身份验证在我的交换服务器上不再起作用。
我在同一个本地网络中有 2 台机器,但在不同的域中。
其中之一我有交换服务器。当我尝试从机器 A 远程连接到 powershell 到机器 B(这里是交换服务器)时。
如果我使用使用 Kerberos 身份验证的 powershell 控制台,我可以建立和导入远程会话。但问题是,当我使用 c# 方法时,它在身份验证上失败,无论是使用 WSManConnectionInfo class 还是使用 powershell.AddScript(...) ,我把相同的脚本 运行 放在powershell 控制台。
有什么想法吗?
实际上,问题不仅在于当我尝试在 c# 中通过 WSManConnectionInfo class 进行连接时,我也无法使用 powershell 控制台进行远程连接。
我很困惑,因为有时我能够 运行 远程连接,所以我错误地认为代码可以从 powershell 控制台运行,而不是从 c# 运行。
最后的问题是,出于某种原因,Kerberos 身份验证在我的交换服务器上不再起作用。