Add usage more than 80

This commit is contained in:
Din Dang
2024-12-24 14:43:46 +08:00
parent 7dc9010451
commit a2ea577efb
28 changed files with 78 additions and 23 deletions
+5 -7
View File
@@ -1,10 +1,8 @@
# 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
if (Get-NetFirewallRule -DisplayName $ruleName) {
Write-Host "Rule already exists, not creating a new one"
} else {
New-NetFirewallRule -DisplayName $ruleName -Direction Inbound -Protocol TCP -LocalPort $port -Action Allow -Profile Any
}