To load the module, just import the module as shown below. The NetSecurity The module, integrated and offered by Microsoft, contains all the necessary functions to add, remove and modify firewall rules. For other operating systems, there are other command line tools that can be used to perform the same type of functions, such as UFW or IPTables on Linux. Please note that this article only applies to the Windows operating system. This article covers the common commands used in Windows Firewall and where they can be used.
Windows contains a robust yet easy-to-use advanced firewall, and with PowerShell 7 we can easily configure the firewall from the command line.