我正在寻求帮助,以便为一组服务器上的非管理员正确配置 PowerShell Remoting。现在我们有一个工作配置,允许管理域帐户成功连接到服务器而没有错误。我们使用的身份验证方法是Credssp,使用SSL,这非常适合域管理员帐户。
另一方面,我有这个用户域帐户userTest。此帐户映射到本地(在每台服务器上)映射到远程桌面用户组的域组。这允许此用户成功地 RDP 到此服务器,但没有管理员权限。它将保持这种状态,并且不能将其设为本地管理员。
此用户的目的是允许非管理员帐户使用受限会话对服务器执行一组脚本,该会话与域管理员帐户连接。当我尝试连接userTest帐户时,问题就出现了。服务器响应访问被拒绝错误:
[ServerA] Connecting to remote server ServerA failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (ServerA:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : AccessDenied,PSSessionStateBroken
通过分析事件日志,我发现一条错误消息如下:
The WSMan service could not launch a host process to process the given request. Make sure the WSMan provider host server and proxy are properly registered.
这是我已经设置的配置:
创建了一个名为 RemoteDesktopUsers 的 PSSessionConfiguration
注册-PSSessionConfiguration -Name RemoteDesktopUsers -StartupScript C:\Start.ps1
Set-PSSessionConfiguration -Name RemoteDesktopUsers -ShowSecurityDescriptorUI(将远程桌面用户组添加到此 SessionConfiguration)
所以是的,基本上从我已经用谷歌搜索的内容来看,这应该是您能够使用非管理员帐户进行 PSRemote 所需的所有必要配置。正如我已经提到使用连接到此 SessionConfiguration 的域管理员帐户工作正常,所以我认为我缺少某种允许此用户访问的权限/特权/SDDL:
Windows Server 2008 R2 SP1
Powershell 4.0
Winrm ProductVersion = 操作系统:6.1.7601 SP:1.0 堆栈:3.0