Eu tenho um problema estranho com o WinRM. A máquina tem outro endereço IP devido a uma migração do servidor. Não consigo fazer o WinRM funcionar novamente. Eu habilitei o serviço WinRM e, de fato, ele está escutando em localhost (porta 5985).
C:\Windows\system32>winrm e winrm/config/listener
Listener
Address = *
Transport = HTTP
Port = 5985
Hostname
Enabled = true
URLPrefix = wsman
CertificateThumbprint
ListeningOn = 127.0.0.1, 192.168.80.54, ::1, fe80::100:7f:fffe%12, fe80::5efe:192.168.80.54%11, fe80::a140:a4a0:3b8f:e423%15
Quando executo test-wsman 127.0.0.1
, a seguinte saída é mostrada:
wsmid : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd
ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
ProductVendor : Microsoft Corporation
ProductVersion : OS: 0.0.0 SP: 0.0 Stack: 2.0
Quando executo test-wsman 192.168.80.54
, o comando não é bem-sucedido:
Test-WSMan : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
At line:1 char:11
+ test-wsman <<<< 192.168.80.54
+ CategoryInfo : InvalidOperation: (192.168.80.54:String) [Test-WSMan], InvalidOperationException
+ FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.TestWSManCommand
Eu posso acessar corretamente outra máquina em 192.168.80.58. Eu verifiquei com netstat -a -n
. Parece que o WinRM está escutando em 127.0.0.1:5985, onde outras máquinas mostram 0.0.0.1:5985.
Eu verifiquei as reservas de URL, mas elas estão bem:
Reserved URL : http://+:47001/wsman/
User: NT SERVICE\WinRM
Listen: Yes
Delegate: No
User: NT SERVICE\Wecsvc
Listen: Yes
Delegate: No
SDDL: D:(A;;GX;;;S-1-5-80-569256582-2953403351-2909559716-1301513147-412116970)(A;;GX;;;S-1-5-80-4059739203-877974739-1245631912-527174227-2996563517)
Reserved URL : https://+:5986/wsman/
User: NT SERVICE\WinRM
Listen: Yes
Delegate: No
User: NT SERVICE\Wecsvc
Listen: Yes
Delegate: No
SDDL: D:(A;;GX;;;S-1-5-80-569256582-2953403351-2909559716-1301513147-412116970)(A;;GX;;;S-1-5-80-4059739203-877974739-1245631912-527174227-2996563517)
Reserved URL : http://+:5985/wsman/
User: NT SERVICE\WinRM
Listen: Yes
Delegate: No
User: NT SERVICE\Wecsvc
Listen: Yes
Delegate: No
SDDL: D:(A;;GX;;;S-1-5-80-569256582-2953403351-2909559716-1301513147-412116970)(A;;GX;;;S-1-5-80-4059739203-877974739-1245631912-527174227-2996563517)