Files
ResourceUsageAPI/publish/configure_firewall.ps1
T
2024-11-28 16:52:40 +08:00

10 lines
317 B
PowerShell

# PowerShell script to create a new inbound rule in Windows Firewall
# Define the port number
$port = 5000
# Define the rule name
$ruleName = "ResourceMonitorService"
# Create a new inbound rule
New-NetFirewallRule -DisplayName $ruleName -Direction Inbound -Protocol TCP -LocalPort $port -Action Allow -Profile Any