powershell 開windows 端口

@echo off
@echo 請以管理員身份運行
set /p portRemark=請輸入端口備註:
set /p port=請輸入端口號:
powershell -command "New-NetFirewallRule -DisplayName '%portRemark%' -Direction Inbound -Action Allow -RemoteAddress Any -Protocol TCP -LocalPort %port%"
pause
相關文章
相關標籤/搜索