You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
New-NetFirewallRule-DisplayName $InboundDisplayName-Confirm -Description "$Name Inbound Rule for port range 5100-5150"-LocalAddress Any -LocalPort 5100-5150-Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound
New-NetFirewallRule-DisplayName $OutboundDisplayName-Confirm -Description "$Name Outbound Rule for port range 5100-5150"-LocalAddress Any -LocalPort 5100-5150-Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound
if (!$rules.Contains($InboundDisplayName) -and!$rules.Contains($OutboundDisplayName))
34
+
{
35
+
Add-InboundRule
36
+
Add-OutboundRule
37
+
}
38
+
elseif (!$rules.Contains($InboundDisplayName))
39
+
{
40
+
Add-InboundRule
41
+
}
42
+
elseif (!$rules.Contains($OutboundDisplayName))
43
+
{
44
+
Add-OutboundRule
45
+
}
46
+
else{
47
+
Write-Host"Rules found!"
48
+
}
49
+
}
50
+
catch [Exception] {
51
+
Add-InboundRule
52
+
Add-OutboundRule
22
53
}
23
-
catch [Exception] {
24
-
New-NetFirewallRule-DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5150"-LocalAddress Any -LocalPort 5100-5150-Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound
25
-
New-NetFirewallRule-DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5150"-LocalAddress Any -LocalPort 5100-5150-Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound
0 commit comments