Last active
December 7, 2020 20:25
-
-
Save rleap-m/5d8158cfe11b3d123fbaef471ab8de0e to your computer and use it in GitHub Desktop.
Docker Firewall Rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-NetFirewallRule -DisplayName '*docker*' | | |
ForEach-Object { $ports = Get-NetFirewallPortFilter -AssociatedNetFirewallRule $_; | |
Select-Object -InputObject $_ -Property DisplayName,Enabled,Profile,Direction,Action, | |
@{Name='Protocol'; Expression={$ports.Protocol}},@{Name='LocalPort'; Expression={[int64]$ports.LocalPort}} } | | |
Sort-Object -Property LocalPort | Format-Table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment