リモートサーバーアクセスのために Windows ファイアウォールでポートを開くIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } この記事では、Windows Management Instrumentation (WMI) と PowerShell を使用してリモート サーバーへのアクセスを許可するように Windows ファイアウォールを構成する方法について説明します。 Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } すべてのリリース Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } Windows ファイアウォールと DCOM ポート Windows ファイアウォールが有効になっているリモート Windows サーバーにアクセスする場合、ポート 135 を開くだけでは検出が成功しない可能性があります。MID サーバーは、ポート 135 でリモートサーバーの RPC (リモートプロシージャコール) エンドポイントに接続します。次に、RPC サービスは、DCOM (分散コンポーネント オブジェクト モデル) 通信用のポートを動的に割り当てます。MID サーバーは、この DCOM ポートを使用してリモートサーバーとさらに通信する必要があります。 DCOM 通信に使用されるポートの範囲は、Windows のバージョンによって異なります。 Windows 2000、Windows XP、および Windows Server 2003 : ポート 1025 から 5000Windows Server 2008 以降、Windows Vista 以降: ポート 49152 から 65535 これらの DCOM ポートが Windows ファイアウォールによってブロックされている場合、ディスカバリーは失敗します。WMIRunner - WMI:分類プローブは、次のようなエラーを返します。 <error> Authentication failure with the local MID server service credential. </error> <error> Failed to access target system. Please check credentials and firewall settings on the target system to ensure accessibility: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Stack Trace: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Management.ManagementScope.InitializeGuts(Object o) at System.Management.ManagementScope.Initialize() at System.Management.ManagementObjectSearcher.Initialize() at System.Management.ManagementObjectSearcher.Get() at Microsoft.PowerShell.Commands.GetWmiObjectCommand.BeginProcessing() at System.Management.Automation.Cmdlet.DoBeginProcessing() at System.Management.Automation.CommandProcessorBase.DoBegin() </error> MID サーバーへのポートを開く方法 MID サーバーアプリケーションホストマシンがすべてのポートのターゲットにアクセスできることを確認します。これは、WMI 要件の固有の性質のために必要です。詳細については、「 サーバーの要件」を参照してください。 すべてのポートを開くことが不可能な場合は、次の手順に従います。 1 - Windows ファイアウォールでポート 135 を開く Windows 2000、XP、Server 2003 の場合 この解決策は、Windows ファイアウォールに例外を追加します。 コントロールパネル > Windows ファイアウォール > 例外 > ポートの追加...] に移動します。名前: RPC Endpoint Mapper - TCP Port 135ポート: 135プロトコル: TCP Windows Server 2008、Vista、およびそれ以降の場合 この解決策は、セキュリティが強化された Windows ファイアウォールにルールを追加して、ポート 135/RPC を開きます。 管理ツール > セキュリティが強化された Windows ファイアウォール に移動します。受信ルールに移動 (右クリック) > 新しいルール...[ルールタイプ]:[カスタム]を選択し、[次へ]を選択します。[プログラム]: すべてのプログラムを選択します。[プログラム]:サービス中: [ カスタマイズ] を選択します。このサービスに適用:リモートプロシージャコール (RPC) - RpcSs を選択します。OK を選択してダイアログボックスを閉じます。[次へ] を選択します。 [プロトコルとポート]:プロトコルタイプ: TCPを選択します。[プロトコルとポート]:ローカルポート:RPC エンドポイントマッパーを選択します。[プロトコルとポート]:レポートポート: すべてのポートを保持し、 次へを選択します。[スコープ]:[このルールが一致するローカル/リモート IP アドレス]:任意の IP アドレス (セキュリティ ポリシーに応じて別の設定が必要な場合があります)を保持し、 次へを選択します。[アクション]: 接続を許可する」を選択します。[プロファイル]:[ドメイン]、[プライベート]、および [パブリック] を選択し (セキュリティ ポリシーによって異なる設定が必要な場合があります)、[ 次へ] を選択します。[名前]:ルールに名前を付けます。例:RPC Endpoint Mapper - TCP Port 135完了を選択します。 ルール File and Printer Sharing - RPC-EPMAP など、他の定義済みのルールで 135/RPC へのアクセスが既に許可されている場合があります。 2 – 標準 DCOM ポートへのアクセスを開く Windows 2000、XP、Server 2003 の場合: このソリューションは、Windows ファイアウォールに例外を追加します。追加する例外が多数あるため、このスクリプトを実行してエントリを追加してください。 ポート 135 が開いていることを確認します (前のセクションを参照)。コマンド ラインを開き、 FOR /L %I in (1025,1,5000) do netsh firewall add portopening TCP %I "Dcom - TCP Port "%I と入力します。 これにより、ポートごとに Windows ファイアウォールにエントリが追加されます (3975 エントリ)。エントリが多すぎる場合は、セクション 3 の手順に従って、DCOM が少数のポートのみを使用するようにします。 Windows Server 2008、Vista、およびそれ以降の場合: これを実現するには、いくつかの方法があります。 前のセクションのコマンドを使用し、Windows 2008 のポート範囲に置き換えますコマンドの (1025,1,5000) を (49152,1,65535) に置き換えます。これにより、ポートごとに 1 つのエントリが Windows ファイアウォールに追加されます (16383 エントリ)。エントリが多すぎる場合は、セクション 3 の次の手順に従って、DCOM が少数のポートのみを使用するようにします。セクション 1 からセキュリティが強化された Windows ファイアウォールにルールを追加します。 ポート 135 が開いていることを確認します (セクション 1 を参照)。管理ツール > セキュリティが強化された Windows ファイアウォール に移動します。受信ルールに移動 (右クリック) > 新しいルール...[ルールタイプ]: カスタムを選択し、 次へを選択します。[プログラム]: すべてのプログラムを選択します。[プログラム]:サービス中: カスタマイズ...すべてのプログラムとサービスに適用を選択します。OK を選択してダイアログボックスを閉じます。[次へ] を選択します。 [プロトコルとポート]:プロトコルタイプ: TCPを選択します。[プロトコルとポート]:ローカルポートを選択します: ダイナミックRPC。[プロトコルとポート]:レポートポート: すべてのポートを保持し、 次へを選択します。[スコープ]:[このルールがどのローカル/リモート IP アドレスに一致するか]: 任意の IP アドレス (セキュリティ ポリシーで別の設定が必要な場合があります)を保持し、[次へ] をクリックします。[アクション]: 接続を許可する」を選択します。[プロファイル]:[ドメイン]、 [プライベート]、および [パブリック] を選択し (セキュリティ ポリシーに対して別の設定が必要な場合があります) [次へ] を選択します。[名前]:ルールに名前を付け (例: DCOM - TCP 動的 RPC)、 完了を選択します。 3 – 限られた範囲のポートを使用するように DCOM を構成する (省略可能) 100 個のポートを追加して DCOM を構成します (65000 – 65100): 管理ツール > コンポーネントサービスに移動します。Console Root > Component Services > Computers> My Computer (右クリック) > Default Protocols > "Connection-oriented TCP/IP" > Properties...ポート範囲の追加: 65000〜65100。サーバーを再起動します。セクション 2 の手順に従います。Windows 2000、XP、Server 2003 の場合は、コマンドの (1025,1,5000) を (65000,1,65100) に置き換えます。これにより、Windows ファイアウォールに 100 個のエントリが追加されます。 注意:これは非常に低い値であり、ディスカバリー (およびその他のリモートアプリケーション) の実行が遅すぎます。 Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: ; width: auto; height: auto; } } Windows ディスカバリー:リモート マシンでの WMI/PowerShell の問題のトラブルシューティング