Browse Source

check if rules exist are failing.

the check shall be like ~ Get-NetFirewallRule -DisplayName eShopOnContainers-* -ErrorAction Stop
pull/1060/head
edmondshtogu 5 years ago
committed by GitHub
parent
commit
4a1684c38e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1

+ 2
- 2
cli-windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 View File

@ -17,10 +17,10 @@ exit
}
try {
Get-NetFirewallRule -DisplayName EshopDocker -ErrorAction Stop
Get-NetFirewallRule -DisplayName eShopOnContainers-* -ErrorAction Stop
Write-Host "Rule found"
}
catch [Exception] {
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
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
}
}

Loading…
Cancel
Save