In: Computer Science
Research the Windows PowerShell commands for manipulating the firewall and construct a command that lists all the firewall rules on a system with the output containing the information and headers below:
Rule name
TCP port
Enabled
PowerShell:
PowerShell is an advanced and powerfull command line interpreter tool than the traditional windows command prompt(CMD). It is a cross-platform task automation and configuration management framework, consisting of a command-line shell and scripting language. PowerShell is developed by Microsoft for the purposes of task automation and configuration management. PowerShell is an open source project and it is based on the .NET framework, and it includes a command-line shell and a scripting language.
What PowerShell can do?:
Soution of above asked questions:
1. Command to Display lists of all firewall rules of system: Get-NetFirewallRule | Select-Object DisplayName, Enabled
2.Command to Display lists of all TCP Ports: Get-NetFirewallPortFilter | Select-Object -Property InstanceID, Protocol, LocalPort, RemotePort
Note: To display list of specific TCP put name of that port ofter -property and run the command
i.e: - Get-NetFirewallPortFilter | Select-Object -Property InstanceID, Protocol
Note: If you are satisfied with this solution then like and review this post.