Windows 2000/XP netsh firewall 命令

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1986-2001 Microsoft Corp. C:\Windows>netsh firewall ? 下列是所有可用的命令。 這個內容中的命令: ? - 顯示命令清單。 add - 新增防火牆設定。 delete - 刪除防火牆設定。 dump - 顯示設定指令檔。 help - 顯示命令清單。 reset - 以預設重設防火牆設定。 set - 設定防火牆設定。 show - 顯示防火牆設定。 如果您要檢視命令的說明,請輸入該命令,後面接著一個空格, 然後輸入 ?。

新增防火牆設定。

»netsh »firewall »add


C:\Windows>netsh firewall add ?

下列是所有可用的命令。

這個內容中的命令:
add allowedprogram - 新增防火牆所允許的程式設定。
add portopening - 新增防火牆連接埠設定。

新增防火牆所允許的程式設定。

»netsh »firewall »add »allowedprogram


C:\Windows>netsh firewall add allowedprogram ?

add allowedprogram
      [ program = ] path
      [ name = ] name
      [ [ mode = ] ENABLE|DISABLE
        [ scope = ] ALL|SUBNET|CUSTOM
        [ addresses = ] addresses
        [ profile = ] CURRENT|DOMAIN|STANDARD|ALL ]

  新增防火牆允許的程式設定。

  program - 程式路徑和檔案名稱。

  參數:

  name - 程式名稱。

  mode - 程式模式 (可省略)。
      ENABLE  - 允許通過防火牆 (預設)。
      DISABLE - 不允許通過防火牆。

  scope - 程式領域 (可省略)。
      ALL    - 允許所有流量通過防火牆 (預設)。
      SUBNET - 只允許本機網路 (子網路) 流量通過防火牆。
      CUSTOM - 只允許指定的流量通過防火牆。

  addresses - 自訂領域位址 (可省略)。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  備註: 'scope' 必須是 'CUSTOM' 才能指定 'addresses'。

  範例:

      add allowedprogram C:\MyApp\MyApp.exe MyApp ENABLE
      add allowedprogram C:\MyApp\MyApp.exe MyApp DISABLE
      add allowedprogram C:\MyApp\MyApp.exe MyApp ENABLE CUSTOM
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet
      add allowedprogram program = C:\MyApp\MyApp.exe name = MyApp mode = ENABLE
      add allowedprogram program = C:\MyApp\MyApp.exe name = MyApp mode = DISABLE
      add allowedprogram program = C:\MyApp\MyApp.exe name = MyApp mode = ENABLE
          scope = CUSTOM addresses =
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet

新增防火牆連接埠設定。

»netsh »firewall »add »portopening


C:\Windows>netsh firewall add portopening ?

add portopening
      [ protocol = ] TCP|UDP|ALL
      [ port = ] 1-65535
      [ name = ] name
      [ [ mode = ] ENABLE|DISABLE
        [ scope = ] ALL|SUBNET|CUSTOM
        [ addresses = ] addresses
        [ profile = ] CURRENT|DOMAIN|STANDARD|ALL
        [ interface = ] name ]

  新增防火牆連接埠設定。

  參數:

  protocol - 連接埠通訊協定。
      TCP - 傳輸控制通訊協定 (TCP)。
      UDP - 使用者資料包通訊協定 (UDP)。
      ALL - 所有的通訊協定。

  port - 連接埠編號。

  name - 連接埠名稱。

  mode - 連接埠模式 (可省略)。
      ENABLE  - 允許通過防火牆。
      DISABLE - 不允許通過防火牆。

  scope - 程式領域 (可省略)。
      ALL    - 允許所有流量通過防火牆 (預設)。
      SUBNET - 只允許本機網路 (子網路) 流量通過防火牆。
      CUSTOM - 只允許指定的流量通過防火牆。

  addresses - 自訂領域位址 (可省略)。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  interface - 介面名稱 (可省略)。

  備註: 'profile' 和 'interface' 不可以同時指定。
        'scope' 和 'interface' 不可以同時指定。
        'scope' 必須是 'CUSTOM' 才能指定 'addresses'。

  範例:

      add portopening TCP 80 MyWebPort
      add portopening UDP 500 IKE ENABLE ALL
      add portopening ALL 53 DNS ENABLE CUSTOM
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet
      add portopening protocol = TCP port = 80 name = MyWebPort
      add portopening protocol = UDP port = 500 name = IKE mode = ENABLE scope = ALL
      add portopening protocol = ALL port = 53 name = DNS mode = ENABLE
          scope = CUSTOM addresses =
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet

刪除防火牆設定。

»netsh »firewall »delete


C:\Windows>netsh firewall delete ?

下列是所有可用的命令。

這個內容中的命令:
delete allowedprogram - 刪除防火牆所允許的程式設定。
delete portopening - 刪除防火牆連接埠設定。

刪除防火牆所允許的程式設定。

»netsh »firewall »delete »allowedprogram


C:\Windows>netsh firewall delete allowedprogram ?

delete allowedprogram
      [ program = ] path
      [ [ profile = ] CURRENT|DOMAIN|STANDARD|ALL ]

  刪除防火牆允許的程式設定。

  參數:

  program - 程式路徑和檔案名稱。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  例如:

      delete allowedprogram C:\MyApp\MyApp.exe
      delete allowedprogram program = C:\MyApp\MyApp.exe

刪除防火牆連接埠設定。

»netsh »firewall »delete »portopening


C:\Windows>netsh firewall delete portopening ?

delete portopening
      [ protocol = ] TCP|UDP|ALL
      [ port = ] 1-65535
      [ [ profile = ] CURRENT|DOMAIN|STANDARD|ALL
        [ interface = ] name ]

  刪除防火牆連接埠設定。

  參數:

  protocol - 連接埠通訊協定。
      TCP - 傳輸控制通訊協定 (TCP)。
      UDP - 使用者資料包通訊協定 (UDP)。
      ALL - 所有的通訊協定。

  port - 連接埠編號。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  interface - 介面名稱 (可省略)。

  備註: 'profile' 和 'interface' 不可以同時指定。

  範例:

      delete portopening TCP 80
      delete portopening UDP 500
      delete portopening protocol = TCP port = 80
      delete portopening protocol = UDP port = 500

顯示設定指令檔。

»netsh »firewall »dump


C:\Windows>netsh firewall dump ?

使用方式: dump

註解:
       建立一個包含目前設定的指令檔。如果儲存到檔案中,
       這個指令檔可被用來還原變更的設定。

顯示命令清單。

»netsh »firewall »help


C:\Windows>netsh firewall help ?

使用方式: help

註解:
       顯示命令清單。

以預設重設防火牆設定。

»netsh »firewall »reset


C:\Windows>netsh firewall reset ?

reset

  以預設重設防火牆設定。

  備註: 重設預設設定值將會刪除所有自 Windows 安裝以來您對
        Windows 防火牆設定所做的變更。這可能造成某些程式
        停止運作。將會刪除任何您對網際網路連線共用所做的
        自訂設定並會停用網際網路連線共用。

設定防火牆設定。

»netsh »firewall »set


C:\Windows>netsh firewall set ?

下列是所有可用的命令。

這個內容中的命令:
set allowedprogram - 設定防火牆所允許的程式設定。
set icmpsetting - 設定防火牆 ICMP 設定。
set logging    - 設定防火牆記錄設定。
set multicastbroadcastresponse - 設定防火牆多點傳送/廣播回應設定。
set notifications - 設定防火牆通知設定。
set opmode     - 設定防火牆操作設定。
set portopening - 設定防火牆連接埠設定。
set service    - 設定防火牆服務設定。

設定防火牆所允許的程式設定。

»netsh »firewall »set »allowedprogram


C:\Windows>netsh firewall set allowedprogram ?

set allowedprogram
      [ program = ] path
      [ name = ] name
      [ [ mode = ] ENABLE|DISABLE
        [ scope = ] ALL|SUBNET|CUSTOM
        [ addresses = ] addresses
        [ profile = ] CURRENT|DOMAIN|STANDARD|ALL ]

  設定防火牆允許的程式設定。

  program - 程式路徑和檔案名稱。

  參數:

  name - 程式名稱。

  mode - 程式模式 (可省略)。
      ENABLE  - 允許通過防火牆 (預設)。
      DISABLE - 不允許通過防火牆。

  scope - 程式領域 (可省略)。
      ALL    - 允許所有流量通過防火牆 (預設)。
      SUBNET - 只允許本機網路 (子網路) 流量通過防火牆。
      CUSTOM - 只允許指定的流量通過防火牆。

  addresses - 自訂領域位址 (可省略)。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  備註: 'scope' 必須是 'CUSTOM' 才能指定 'addresses'。

  範例:

      set allowedprogram C:\MyApp\MyApp.exe MyApp ENABLE
      set allowedprogram C:\MyApp\MyApp.exe MyApp DISABLE
      set allowedprogram C:\MyApp\MyApp.exe MyApp ENABLE CUSTOM
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet
      set allowedprogram program = C:\MyApp\MyApp.exe name = MyApp mode = ENABLE
      set allowedprogram program = C:\MyApp\MyApp.exe name = MyApp mode = DISABLE
      set allowedprogram program = C:\MyApp\MyApp.exe name = MyApp mode = ENABLE
          scope = CUSTOM addresses =
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet

設定防火牆 ICMP 設定。

»netsh »firewall »set »icmpsetting


C:\Windows>netsh firewall set icmpsetting ?

set icmpsetting
      [ type = ] 2-5|8-9|11-13|17|ALL
      [ [ mode = ] ENABLE|DISABLE
        [ profile = ] CURRENT|DOMAIN|STANDARD|ALL
        [ interface = ] name ]

  設定防火牆 ICMP 設定值。

  參數:

  type - ICMP 類型。
      2   - 允許輸出封包太大。
      3   - 允許無法到達輸出目的地。
      4   - 允許輸出來源抑制。
      5   - 允許重新導向。
      8   - 允許輸入回應要求。
      9   - 允許輸入路由要求。
      11  - 允許超出輸出時間。
      12  - 允許輸出參數問題。
      13  - 像\輸入時間戳記要求。
      17  - 允許輸入遮罩要求。
      ALL - 所有類型。

  mode - ICMP 模式 (可省略)。
      ENABLE  - 允許通過防火牆 (預設)。
      DISABLE - 不允許通過防火牆。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  interface - 介面名稱 (可省略)。

  備註: 'profile' 和 'interface' 不可以同時指定。
        'type' 2 和 'interface' 不可以同時指定。

  範例:

      set icmpsetting 8
      set icmpsetting 8 ENABLE
      set icmpsetting ALL DISABLE
      set icmpsetting type = 8
      set icmpsetting type = 8 mode = ENABLE
      set icmpsetting type = ALL mode = DISABLE

設定防火牆記錄設定。

»netsh »firewall »set »logging


C:\Windows>netsh firewall set logging ?

set logging
      [ [ filelocation = ] path
        [ maxfilesize = ] 1-32767
        [ droppedpackets = ] ENABLE|DISABLE
        [ connections = ] ENABLE|DISABLE ]

  設定防火牆記錄設定。

  參數:

  filelocation - 記錄路徑和檔案名稱 (可省略)。

  maxfilesize - 單位為 KB 的最大記錄檔案大小 (可省略)。

  droppedpackets - 丟棄封包的記錄模式 (可省略)。
      ENABLE  - 記錄在防火牆中。
      DISABLE - 不記錄在防火牆中。

  connections - 成功連線的記錄模式 (可省略)。
      ENABLE  - 記錄在黎儺薴丑C
      DISABLE - 不記錄在防火牆中。

  備註: 必須至少指定一個參數。

  範例:

      set logging %windir%\pfirewall.log 4096
      set logging %windir%\pfirewall.log 4096 ENABLE
      set logging filelocation = %windir%\pfirewall.log maxfilesize = 4096
      set logging filelocation = %windir%\pfirewall.log maxfilesize = 4096
      droppedpackets = ENABLE

設定防火牆多點傳送/廣播回應設定。

»netsh »firewall »set »multicastbroadcastresponse


C:\Windows>netsh firewall set multicastbroadcastresponse ?

set multicastbroadcastresponse
      [ mode = ] ENABLE|DISABLE
      [ [ profile = ] CURRENT|DOMAIN|STANDARD|ALL ]

  設定防火牆多點傳送/廣播回應設定。

  參數:

  mode - 多點傳送/廣播回應模式
      ENABLE  - 允許回應多點傳送/廣播的流量經過防火牆。

      DISABLE - 不允許回應多點傳送/廣播的流量經過防火牆。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  範例:

      set multicastbroadcastresponse ENABLE
      set multicastbroadcastresponse DISABLE
      set multicastbroadcastresponse mode = ENABLE
      set multicastbroadcastresponse mode = DISABLE

設定防火牆通知設定。

»netsh »firewall »set »notifications


C:\Windows>netsh firewall set notifications ?

set notifications
      [ mode = ] ENABLE|DISABLE
      [ [ profile = ] CURRENT|DOMAIN|STANDARD|ALL ]

  設定防火牆通知設定。

  參數:

  mode - 通知模式。
      ENABLE  - 允許來自防火牆的快顯通知。
      DISABLE - 不允許來自防火牆的快顯通知。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  範例:

      set notifications ENABLE
      set notifications DISABLE
      set notifications mode = ENABLE
      set notifications mode = DISABLE

設定防火牆操作設定。

»netsh »firewall »set »opmode


C:\Windows>netsh firewall set opmode ?

set opmode
      [ mode = ] ENABLE|DISABLE
      [ [ exceptions = ] ENABLE|DISABLE
        [ profile = ] CURRENT|DOMAIN|STANDARD|ALL
        [ interface = ] name ]

  設定防火牆操作設定。

  參數:

  mode - 操作模式。
      ENABLE  - 啟用防火牆。
      DISABLE - 停用防火牆。

  exceptions - 例外模式 (可省略)。
      ENABLE  - 允許通過防火牆。
      DISABLE - 不允許通過防火牆。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  interface - 介面名稱 (可省略)。

  備註: 'profile' 和 'interface' 不可以同時指定。
        'exceptions' 和 'interface' 不可以同時指定。

  範例:

      set opmode ENABLE
      set opmode ENABLE DISABLE
      set opmode mode = ENABLE
      set opmode mode = ENABLE exceptions = DISABLE

設定防火牆連接埠設定。

»netsh »firewall »set »portopening


C:\Windows>netsh firewall set portopening ?

set portopening
      [ protocol = ] TCP|UDP|ALL
      [ port = ] 1-65535
      [ name = ] name
      [ [ mode = ] ENABLE|DISABLE
        [ scope = ] ALL|SUBNET|CUSTOM
        [ addresses = ] addresses
        [ profile = ] CURRENT|DOMAIN|STANDARD|ALL
        [ interface = ] name ]

  設定防火牆連接埠設定。

  參數:

  protocol - 連接埠通訊協定。
      TCP - 傳輸控制通訊協定 (TCP)。
      UDP - 使用者資料包通訊協定 (UDP)。
      ALL - 所有的通訊協定。

  port - 連接埠編號。

  name - 連接埠名稱。

  mode - 連接埠模式 (可省略)。
      ENABLE  - 允許通過防火牆。
      DISABLE - 不允許通過防火牆。

  scope - 程式領域 (可省略)。
      ALL    - 允許所有流量通過防火牆 (預設)。
      SUBNET - 只允許本機網路 (子網路) 流量通過防火牆。
      CUSTOM - 只允許指定的流量通過防火牆。

  addresses - 自訂領域位址 (可省略)。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  interface - 介面名稱 (可省略)。

  備註: 'profile' 和 'interface' 不可以同時指定。
        'scope' 和 'interface' 不可以同時指定。
        'scope' 必須是 'CUSTOM' 才能指定 'addresses'。

  範例:

      set portopening TCP 80 MyWebPort
      set portopening UDP 500 IKE ENABLE AL
      set portopening ALL 53 DNS ENABLE CUSTOM
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet
      set portopening protocol = TCP port = 80 name = MyWebPort
      set portopening protocol = UDP port = 500 name = IKE mode = ENABLE scope = ALL
      set portopening protocol = ALL port = 53 name = DNS mode = ENABLE
          scope = CUSTOM addresses =
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet

設定防火牆服務設定。

»netsh »firewall »set »service


C:\Windows>netsh firewall set service ?

set service
      [ type = ] FILEANDPRINT|REMOTEADMIN|REMOTEDESKTOP|UPNP|ALL
      [ [ mode = ] ENABLE|DISABLE
        [ scope = ] ALL|SUBNET|CUSTOM
        [ addresses = ] addresses
        profile = ] CURRENT|DOMAIN|STANDARD|ALL ]

  設定防火牆服務設定。

  參數:

  type - 服務類型。
      FILEANDPRINT  - 檔案及印表機共用。
      REMOTEADMIN   - 遠端系統管理。
      REMOTEDESKTOP - 遠端協助和遠端桌面。
      UPNP          - UPnP 架構。
      ALL           - 所有類型。

  mode - 服務模?(可省略)。
      ENABLE  - 允許通過防火牆。
      DISABLE - 不允許通過防火牆。

  scope - 程式領域 (可省略)。
      ALL    - 允許所有流量通過防火牆 (預設)。
      SUBNET - 只允許本機網路 (子網路) 流量通過防火牆。
      CUSTOM - 只允許指定的流量通過防火牆。

  addresses - 自訂領域位址 (可省略)。

  profile - 組態設定檔 (可省略)。
      CURRENT  - 目前的設定檔 (預設)。
      DOMAIN   - 網域設定檔。
      STANDARD - 標準設定檔。
      ALL      - 所有設定檔。

  備註: 如果 'mode' 為 DISABLE 氶A將會略過 'scope'。
        'scope' 必須是 'CUSTOM' 才能指定 'addresses'。

  範例:

      set service FILEANDPRINT
      set service REMOTEADMIN ENABLE SUBNET
      set service REMOTEDESKTOP ENABLE CUSTOM
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet
      set service type = FILEANDPRINT
      set service type = REMOTEADMIN mode = ENABLE scope = SUBNET
      set service type = REMOTEDESKTOP mode = ENABLE scope = CUSTOM addresses =
          157.60.0.1,172.16.0.0/16,10.0.0.0/255.0.0.0,LocalSubnet

顯示防火牆設定。

»netsh »firewall »show


C:\Windows>netsh firewall show ?

下列是所有可用的命令。

這個內容中的命令:
show allowedprogram - 顯示防火牆所允許的程式設定。
show config    - 顯示防火牆設定。
show currentprofile - 顯示目前的防火牆設定檔。
show icmpsetting - 顯示防火牆 ICMP 設定。
show logging   - 顯示防火牆記錄設定。
show multicastbroadcastresponse - 顯示防火牆多點傳送/廣播回應設定。
show notifications - 顯示防火牆通知設定。
show opmode    - 顯示防火牆操作設定。
show portopening - 顯示防火牆連接埠設定。
show service   - 顯示防火牆服務設定。
show state     - 顯示目前的防火牆狀態。

顯示防火牆所允許的程式設定。

»netsh »firewall »show »allowedprogram


C:\Windows>netsh firewall show allowedprogram ?

show allowedprogram
      [ [ verbose = ] DISABLE|ENABLE ]

  顯示防火牆允許的程式設定。

  參數:

  verbose - 詳細模式 (可省略)。
      DISABLE - 只顯示摘要資訊 (預設)。
      ENABLE  - 顯示所有可用資訊。

  例如:

      show allowedprogram
      show allowedprogram DISABLE
      show allowedprogram ENABLE
      show allowedprogram verbose = DISABLE
      show allowedprogram verbose = ENABLE

顯示防火牆設定。

»netsh »firewall »show »config


C:\Windows>netsh firewall show config ?

show config
      [ [ verbose = ] DISABLE|ENABLE ]

  顯示防火牆設定。

  參數:

  verbose - 詳細模式 (可省略)。
      DISABLE - 只顯示摘要資訊 (預設)。
      ENABLE  - 顯示所有可用資訊。

  例如:

      show config
      show config DISABLE
      show config ENABLE
      show config verbose = DISABLE
      show config verbose = ENABLE

顯示目前的防火牆設定檔。

»netsh »firewall »show »currentprofile


C:\Windows>netsh firewall show currentprofile ?

show currentprofile

  顯示目前的防火牆設定檔。

顯示防火牆 ICMP 設定。

»netsh »firewall »show »icmpsetting


C:\Windows>netsh firewall show icmpsetting ?

show icmpsetting
      [ [ verbose = ] DISABLE|ENABLE ]

  顯示防火牆 ICMP 設定。

  參數:

  verbose - 詳細模式 (可省略)。
      DISABLE - 只顯示摘要資訊 (預設)。
      ENABLE  - 顯示所有可用資訊。

  例如:

      show icmpsetting
      show icmpsetting DISABLE
      show icmpsetting ENABLE
      show icmpsetting verbose = DISABLE
      show icmpsetting verbose = ENABLE

顯示防火牆記錄設定。

»netsh »firewall »show »logging


C:\Windows>netsh firewall show logging ?

show logging

  顯示防火牆記錄設定。

顯示防火牆多點傳送/廣播回應設定。

»netsh »firewall »show »multicastbroadcastresponse


C:\Windows>netsh firewall show multicastbroadcastresponse ?

show multicastbroadcastresponse

  顯示防火牆多點傳送/廣播回應設定。

顯示防火牆通知設定。

»netsh »firewall »show »notifications


C:\Windows>netsh firewall show notifications ?

show notifications

  顯示防火牆通知設定。

顯示防火牆操作設定。

»netsh »firewall »show »opmode


C:\Windows>netsh firewall show opmode ?

show opmode

  顯防火牆示操作設定。

顯示防火牆連接埠設定。

»netsh »firewall »show »portopening


C:\Windows>netsh firewall show portopening ?

show portopening
      [ [ verbose = ] DISABLE|ENABLE ]

  顯示防火牆連接埠設定。

  參數:

  verbose - 詳細模式 (可省略)。
      DISABLE - 只顯示摘要資訊 (預設)。
      ENABLE  - 顯示所有可用資訊。

  例如:

      show portopening
      show portopening DISABLE
      show portopening ENABLE
      show portopening verbose = DISABLE
      show portopening verbose = ENABLE

顯示防火牆服務設定。

»netsh »firewall »show »service


C:\Windows>netsh firewall show service ?

show service
      [ [ verbose = ] DISABLE|ENABLE ]

  顯示防火牆服務設定。

  參數:

  verbose - 詳細模式 (可省略)。
      DISABLE - 只顯示摘要資訊 (預設)。
      ENABLE  - 顯示所有可用資訊。

  例如:

      show service
      show service DISABLE
      show service ENABLE
      show service verbose = DISABLE
      show service verbose = ENABLE

顯示目前的防火牆狀態。

»netsh »firewall »show »state


C:\Windows>netsh firewall show state ?

show state
      [ [ verbose = ] DISABLE|ENABLE ]

  顯示目前的防火牆狀態。

  參數:

  verbose - 詳細模式 (可省略)。
      DISABLE - 只顯示摘要資訊 (預設)。
      ENABLE  - 顯示所有可用資訊。

  例如:

      show state
      show state DISABLE
      show state ENABLE
      show state verbose = DISABLE
      show state verbose = ENABLE



- br -/- cn -/- cz -/- de -/- dk -/- en -/- es -/- fr -/- gr -/- hu -/- it -/- jp -/- kr -/- no -/- pl -/- pt -/- ru -/- tr -/- tw -









... Windows-10




Windows 10 How To

... Windows 10 FAQ
... Windows 10 How To



HTTP: ... console/en/index.htm
0.249
9187

Defender slows down the development of applications, programs and APPs!

Funktioniert bei Windows 11 der Verzeichnis Ausdruck ohne Probleme?

Lokale Gruppenrichtlinien zurücksetzen unter Windows 11, 10, ... über cmd.exe!

Copy files excluding directory under Windows 11, 10, 8.1, ...!

How to edit registry on Windows 10 or 11!

Switch to bold font on Windows 11 and 10 system-wide, but can I?



(0)