Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell WinRM无法完成该操作。验证指定的计算机名是否有效_Powershell - Fatal编程技术网

Powershell WinRM无法完成该操作。验证指定的计算机名是否有效

Powershell WinRM无法完成该操作。验证指定的计算机名是否有效,powershell,Powershell,当我试图获取远程计算机上的服务信息时,我遇到了一个WINRM错误 PS C:\Windows\system32> invoke-command -computername Node1 -ScriptBlock {gsv} [Node1] Connecting to remote server Node1 failed with the following error message : WinRM cannot complete the operation. Verify

当我试图获取远程计算机上的服务信息时,我遇到了一个WINRM错误

 PS C:\Windows\system32> invoke-command -computername Node1 -ScriptBlock {gsv}
 [Node1] Connecting to remote server Node1 failed with the following error      
 message : WinRM cannot complete the operation. Verify that the specified computer 
 name is valid, that the computer is accessible over the network, and that a firewall 
 exception for the WinRM service is enabled and allows access from this computer. By 
 default, the WinRM firewall exception for public profiles limits access to remote computers
 within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo          : OpenError: (Node1:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : WinRMOperationTimeout,PSSessionStateBroken

两台计算机上都启用了WinRM吗


并检查它。

尝试下面的解决方法来解决WINRM问题

连接到远程服务器并以管理员身份从cmd运行以下命令

    C:\Windows\system32>WinRM quickconfig
 WinRM service is already running on this machine.
 WinRM is not set up to allow remote access to this machine for management.
 The following changes must be made:

 Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this
 machine.

 Make these changes [y/n]? y

 WinRM has been updated for remote management.

 Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this
 machine.

您是否检查了远程计算机的防火墙规则?默认规则仅允许本地子网中的IP

要允许其他IP,请执行以下操作:

  • 使用高级安全性打开Windows防火墙
  • 单击入站规则
  • 双击Windows远程管理(HTTP In)以获取公共配置文件
  • 单击范围选项卡
  • 在“远程IP地址”下,添加所需的任何IP

  • 您是否在目标计算机上启用了windows远程处理(
    启用PSRemoting
    winrm quickconfig
    )我正在使用Powershell和Search UnifiedAuditLog cmdlet从office 365下载审核日志。似乎工作正常,但在正确运行进程数小时后,我得到了相同的错误。你有什么可能出错的线索吗?为什么一开始没有失败?
        C:\Windows\system32>WinRM quickconfig
     WinRM service is already running on this machine.
     WinRM is not set up to allow remote access to this machine for management.
     The following changes must be made:
    
     Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this
     machine.
    
     Make these changes [y/n]? y
    
     WinRM has been updated for remote management.
    
     Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this
     machine.