powershell - Enable-PSRemoting 后无法创建远程 powershell session

标签 powershell remoting

我不能远程进入任何机器来挽救我的生命!我已经尝试了我能找到的一切。如果有人可以排除故障或指导我,我将不胜感激,因为这将是添加到我的域的好工具。

设置:

  • 域内的客户端机器
  • 域内或域外的服务器计算机 - 已虚拟化并用于 WSUS 计算机名称:wsustest
  • 客户端服务器机器物理计算机名称:epizzi-pc

  • 脚步:

    启用-pssremoting 完成!在所有机器上
    使用 * 配置的trustedhosts 或添加了客户端机器
    以防万一,关闭公共(public)配置文件的防火墙


    输入-PSSession -ComputerName wsustest -Credential wsustest\administrator
    Enter-PSSession -ComputerName epizzi-pc -Credential epizzi-pc\administrador
    Enter-PSSession : 连接到远程服务器 epizzi-pc 失败,并显示以下错误消息: WinRM 无法处理请求。以下错误代码为 0x80090311
    使用 Kerberos 身份验证时发生:当前没有可用于服务登录请求的登录服务器。
    可能的原因有:
    - 指定的用户名或密码无效。
    -Kerberos 在没有指定身份验证方法和用户名时使用。
    -Kerberos 接受域用户名,但不接受本地用户名。
    - 远程计算机名称和端口的服务主体名称 (SPN) 不存在。
    -客户端和远程计算机在不同的域中,两个域之间没有信任。
    检查上述问题后,请尝试以下操作:
    - 检查事件查看器以获取与身份验证相关的事件。
    -改变认证方式;将目标计算机添加到 WinRM TrustedHosts 配置设置或使用 HTTPS 传输。
    请注意,TrustedHosts 列表中的计算机可能未经过身份验证。
    - 有关 WinRM 配置的更多信息,请运行以下命令:winrm help config。有关详细信息,请参阅 about_Remote_Troubleshooting 帮助主题。
    在行:1 字符:1
    + Enter-PSSession -ComputerName epizzi-pc -Credential epizzi-pc\administrador
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (epizzi-pc:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed


    输入-PSSession -ComputerName wsustest -UseSSL -Credential wsustest\administrator

    *Enter-PSSession:连接到远程服务器 wsustest 失败,并显示以下错误消息:WinRM 无法完成操作。验证指定的计算机名称是
    有效,该计算机可通过网络访问,并且 WinRM 服务的防火墙异常(exception)已启用并允许从该计算机进行访问。默认情况下,WinRM
    公共(public)配置文件的防火墙异常(exception)限制对同一本地子网中的远程计算机的访问。有关详细信息,请参阅 about_Remote_Troubleshooting 帮助主题。
    在行:1 字符:1
    + Enter-PSSession -ComputerName wsustest -UseSSL -Credential wsustest\administrato ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (wsustest:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed*
    错误:

    最佳答案

    我在远程连接到服务器时遇到了同样的问题,发现这篇博文非常有帮助 - http://jeffgraves.me/2013/10/14/powershell-remoting/

    对于我的具体情况,我做了以下事情:

    在本地机器上

  • winrm quickconfig(虽然已经配置)
  • winrm s winrm/config/client '@{TrustedHosts="myservername.domain"}'

  • 在远程机器上
  • 启用-psremoting -force
  • Set-PSSessionConfiguration -ShowSecurityDescriptorUI -Name Microsoft.PowerShell -Force
  • 关于powershell - Enable-PSRemoting 后无法创建远程 powershell session ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16062033/

    相关文章:

    java - 查找给定 Windows 版本的最新版本的方法

    python - 如何使用Python和托管身份/SAS凭据从VM访问Azure存储帐户

    c# - 混合安全和不安全的 channel

    c# - MarshalByRefObject 生命周期

    vb.net - 远程进程/应用程序监控的示例代码

    networking - Windows 7 : Change the priority of traffic to wired instead of the wireless connection?

    json - PowerShell 将字符串转换为 json

    powershell - 无法在 powershell 中使用 ADSI 设置属性

    java - 用于执行 Java-jQuery 对象远程处理的库或组件?

    c# - 在 C# 中通过远程处理获取外部 IP 地址