ローカルホストでのみ待機しているWindowsリモート管理サービス


1

WinRMに奇妙な問題があります。サーバーの移行により、マシンに別のIPアドレスが割り当てられました。 WinRMを再び機能させることができません。 WinRMサービスを有効にしましたが、実際にはlocalhost(ポート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

走ったとき test-wsman 127.0.0.1 以下の出力が表示されます。

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

走ったとき test-wsman 192.168.80.54 コマンドは成功しません。

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

私は192.168.80.58で他のマシンに正しくアクセスできます。私はチェックしました netstat -a -n。 WinRMは127.0.0.1:5985をリッスンしているようですが、他のマシンは0.0.0.1:5985を示しています。

URLの予約を確認しましたが、これらも問題ないように見えます。

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)

Pingと言うなんらかの方法でそのリモートマシン(.54)と通信できますか?ファイアウォールは起動していますか?起動している場合は、WinRM例外が追加されています(つまり、実行しましたか?) winrm quickconfig )?
Ƭᴇcʜιᴇ007

回答:


1

このコンピュータには、以前は2つのIPアドレスが割り当てられていました。 IISが両方のIPアドレスをリッスンするのを防ぐために、HTTP設定が変更され、一方のIPアドレスのみがリッスンされるようになりました。次のコマンドを実行して、HTTPドライバがどのIPアドレスを使用しているかを確認できます。

C:\WINDOWS\system32> netsh http show iplisten

IP addresses present in the IP listen list:
-------------------------------------------

    127.0.0.1
    192.168.70.10

すべてのIPアドレスがリストから削除された場合、HTTP.SYSはすべてのIPアドレスを使用するため、すべてのIPアドレスを削除すれば十分です。


0

ほとんどの場合、HTTPリスナーを再作成すると効果的です。

PowerShellの場合:

Remove-WSManInstance winrm/config/Listener -SelectorSet @{Address="*";Transport="http"}
New-WSManInstance winrm/config/Listener -SelectorSet @{Address="*";Transport="http"}

コマンドプロンプトで:

winrm delete winrm/config/Listener?Address=*+Transport=HTTP
winrm create winrm/config/Listener?Address=*+Transport=HTTP

特定のアドレスを使用するには、 Address="IP:YourIPAddress" 代わりに構文。

注:上記のコマンドでは、 あなたのIPアドレス プレースホルダは、IPアドレスに合わせて変更する必要がある値です。


参考文献:

関連する質問 1つのアドレスからのみPowerShellリモート処理を許可する

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.