presents by IT Consulting 109

PowerShell – ファイアウォール情報を取得②

概要

前回、「PowerShell – ファイアウォール情報を取得」で説明した情報の取得方法以外で、各プロファイルの情報を取得する方法について記載しています。

 
 

手順

ドメイン

netsh advfirewall show domainprofile

実行結果

ドメイン プロファイル 設定:
----------------------------------------------------------------------
State                                 オン
Firewall Policy                       BlockInbound,AllowOutbound
LocalFirewallRules                    N/A (GPO ストアのみ)
LocalConSecRules                      N/A (GPO ストアのみ)
InboundUserNotification               無効
RemoteManagement                      無効
UnicastResponseToMulticast            有効

ログ:
LogAllowedConnections                 無効
LogDroppedConnections                 無効
FileName                              %systemroot%\system32\LogFiles\Firewall\pfirewall.log
MaxFileSize                           4096

 
プライベート

netsh advfirewall show privateprofile

実行結果

プライベート プロファイル 設定:
----------------------------------------------------------------------
State                                 オン
Firewall Policy                       BlockInbound,AllowOutbound
LocalFirewallRules                    N/A (GPO ストアのみ)
LocalConSecRules                      N/A (GPO ストアのみ)
InboundUserNotification               有効
RemoteManagement                      無効
UnicastResponseToMulticast            有効

ログ:
LogAllowedConnections                 無効
LogDroppedConnections                 無効
FileName                              %systemroot%\system32\LogFiles\Firewall\pfirewall.log
MaxFileSize                           4096

 

  パブリック

netsh advfirewall show publicprofile

実行結果

パブリック プロファイル 設定:
----------------------------------------------------------------------
State                                 オン
Firewall Policy                       BlockInbound,AllowOutbound
LocalFirewallRules                    N/A (GPO ストアのみ)
LocalConSecRules                      N/A (GPO ストアのみ)
InboundUserNotification               有効
RemoteManagement                      無効
UnicastResponseToMulticast            有効

ログ:
LogAllowedConnections                 無効
LogDroppedConnections                 無効
FileName                              %systemroot%\system32\LogFiles\Firewall\pfirewall.log
MaxFileSize                           4096

 
すべてのプロファイルを一括で表示する場合は次のコマンドを実行します。

netsh advfirewall show allprofile

 

補足


現在どのプロファイルで動作しているのか確認確認する場合は「currentprofile」を使用します。

netsh advfirewall show allprofile

実行結果

ドメイン プロファイル 設定:
----------------------------------------------------------------------
State                                 オン
Firewall Policy                       BlockInbound,AllowOutbound
LocalFirewallRules                    N/A (GPO ストアのみ)
LocalConSecRules                      N/A (GPO ストアのみ)
InboundUserNotification               無効
RemoteManagement                      無効
UnicastResponseToMulticast            有効

ログ:
LogAllowedConnections                 無効
LogDroppedConnections                 無効
FileName                              %systemroot%\system32\LogFiles\Firewall\pfirewall.log
MaxFileSize                           4096

現在使用しているいずれかのプロファイルが表示されます。

この記事を書いた人
名前:TRUE's。 千葉県育ち、神奈川県在住のIT系フリーエンジニア。 IT系のナレッジサイトを不定期で更新中。 フォトグラファー兼エンジニアとして日々勤しんでいる。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny