Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

Utilizing New-NetFirewallDynamicKeywordAddress in PowerShell for Windows Firewall Management


In this article, we will explore the New-NetFirewallDynamicKeywordAddress cmdlet in PowerShell and its significance in managing the Windows Firewall. We will discuss how it can be used to create dynamic firewall rules based on keywords, making the firewall management process more efficient and flexible. This feature is exclusive to the Windows environment and provides a powerful tool for network administrators to enhance their security measures.


Examples:
Example 1: Creating a Dynamic Firewall Rule for Outbound Traffic


New-NetFirewallDynamicKeywordAddress -Name "DynamicOutboundRule" -DisplayName "Dynamic Outbound Rule" -Keyword "Outbound" -Description "Allow outbound traffic"

This example demonstrates how to create a dynamic firewall rule using the New-NetFirewallDynamicKeywordAddress cmdlet. The rule is named "DynamicOutboundRule" and will allow outbound traffic based on the keyword "Outbound". The rule will be displayed with the name "Dynamic Outbound Rule" and a description stating its purpose.


Example 2: Modifying an Existing Dynamic Firewall Rule


Set-NetFirewallDynamicKeywordAddress -Name "DynamicOutboundRule" -DisplayName "Modified Outbound Rule" -Keyword "Outbound, Modified" -Description "Allow modified outbound traffic"

This example shows how to modify an existing dynamic firewall rule using the Set-NetFirewallDynamicKeywordAddress cmdlet. The rule named "DynamicOutboundRule" is updated with a new display name, keyword, and description. The modified rule will allow both outbound and modified outbound traffic.


Example 3: Removing a Dynamic Firewall Rule


Remove-NetFirewallDynamicKeywordAddress -Name "DynamicOutboundRule"

This example illustrates how to remove a dynamic firewall rule using the Remove-NetFirewallDynamicKeywordAddress cmdlet. The rule named "DynamicOutboundRule" will be deleted from the Windows Firewall configuration.


To share Download PDF