Debian Codegraph @

.github/workflows/scripts/win-required-ports.ps1

raw
1 <#
2 .SYNOPSIS
3 This script ensures that the ports required by the default configuration of the collector are available.
4 .DESCRIPTION
5 Certain runs on GitHub Actions sometimes have ports required by the default configuration reserved by other
6 applications via the WinNAT service.
7 #>
8
9 #Requires -RunAsAdministrator
10
11 netsh interface ip show excludedportrange protocol=tcp
12
13 Stop-Service winnat
14
15 # Only port in the dynamic range that is being, from time to time, reserved by other applications.
16 netsh interface ip add excludedportrange protocol=tcp startport=55679 numberofports=1
17
18 Start-Service winnat
19
20 netsh interface ip show excludedportrange protocol=tcp