Server2008R2でPSRemotingを正常に有効にしました。ホスト名をターゲットとして使用して、同じネットワーク内からリモートセッションを実行できます。
任意のコンピューター(ネットワーク内または別のネットワーク(VPN経由など))からIPアドレスをターゲットとして使用しようとすると失敗します。ホスト名を解決できないため、IPアドレスを使用する必要があるVPN接続を介してリモート処理を使用できるようにしたい。
クライアントに同じdns-nameを持つ他のサーバーがいくつかあり、name-ip-address-associationを削除して再度挿入したくないため、hosts-fileに名前を追加したくありません。そしてまた。
誰かがpsremoting-targetをIP経由で呼び出すことを許可する方法を教えてくれることを願っています。
編集:より具体的には、これを実行できるようにしたい:
Enter-PSSession -Computername 192.168.123.123 -credentials $cred
-Computername
ただし、ホスト名を「 」に渡した場合にのみ、そのコマンドを実行できます。
Edit2 :(
内部ネットワークから)ホスト名の代わりにIPを使用してログインしようとすると、次のエラーメッセージが表示されます。
Enter-PSSession : Connecting to remote server failed with the following error message : The WinRM client cannot process
the request. Default authentication may be used with an IP address under the following conditions: the transport is HT
TPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use winrm.cmd to configure T
rustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more information on how to se
t TrustedHosts run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting
Help topic.
Edit3:
WSManのtrusted-hosts設定については知っていますが、それは問題ではないようです。すでに「*」に設定されていますが(リモーティングを有効にした直後に行いました)、ipをtarget-computernameとして使用してそのサーバーに接続することはできませんが、hostnameをtarget-computernameとして使用して接続することはできます。 。ホスト名ではなくIP番号をターゲットとする要求をリスナーがリッスンできないようにするIISのバインディングのようなものがあるようです。ただし、IISはインストールされていません。そのような設定をどこで探すべきかわかりません。
更新2011-07-12:
わかりました。DCからホスト名を介して接続できるため、trustedhosts-settingは問題ではないと思いますが、computer-paramに宛先のIPアドレスを使用する場合は問題ありません。
問題はリスナーにあるに違いないと思います。たぶん、リスナーは、destination-hostnameではなくdestination-ipをターゲットにしたリクエストを受け取らないでしょう。しかし、それを変更する方法がわかりません。