netsh firewall delete portopening protocol = TCP|UDP|ALL port = portnumber
برای مثال بستن پورت شماره 445 با پروتکل TCP
کد:
netsh firewall delete portopening protocol = TCP port = 445
جزئیات و مثال های Command
کد:
Used to delete an existing port-based exception.
delete portopening
[ protocol = ] TCP|UDP|ALL
[ port = ] 1-65535
[ [ profile = ] CURRENT|DOMAIN|STANDARD|ALL
[ interface = ] name ]
Deletes firewall port configuration.
Parameters:
protocol - Port protocol.
TCP - Transmission Control Protocol (TCP).
UDP - User Datagram Protocol (UDP).
ALL - All protocols.
port - Port number.
profile - Configuration profile (optional).
CURRENT - Current profile (default).
DOMAIN - Domain profile.
STANDARD - Standard profile.
ALL - All profiles.
interface - Interface name (optional).
Remarks: 'profile' and 'interface' may not
be specified together
کد:
Examples:
delete portopening TCP 80
delete portopening UDP 500
delete portopening protocol = TCP port = 80
delete portopening protocol = UDP port = 500