通过Enable-PSRemoting 开启Powershell远程管理失败的解决方法

简介:

1 Powershell 远程管理是Windows一项很常用的管理方式,但是我们在网上搜到的一些开启方法都是通过Enable-PSRemoting,或者winrm quickconfig,但是有时候执行完毕后发现还是无法实现远程。提示消息是“连接到远程服务器失败,错误消息如下:客户端无法连接到请求中指定的目标”

Image

2 解决方法:

我们需要首先确定Winrm是否开启了侦听:

查看一下Winrm侦听的端口和IP

winrm enumerate winrm/config/Listener

发现侦听的IP是空的

image

所以我们需要重新建立侦听器:

我们重新建立winrm侦听,可以指定IP或者使用通配符:

winrm create winrm/config/listener?Address=*+Transport=HTTP

Image

再次查看一下:

Image

 

再次建立Session已经成功了。

Image(133)



本文转自handsome7038 51CTO博客,原文链接:http://blog.51cto.com/lixiaosong/1595994

相关文章
|
Linux Windows
跨平台PowerShell如何远程管理Linux/Mac/Windows?
 跨平台PowerShell如何远程管理Linux/Mac/Windows? 首先,在要管理的机器上安装跨平台PowerShell:https://github.
1272 0