powershell 在Windows桌面上打开防火墙端口

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell 在Windows桌面上打开防火墙端口相关的知识,希望对你有一定的参考价值。

# Incoming Rules
netsh advfirewall firewall add rule name='Pylon Application Server' dir=in action=allow protocol=TCP localport=8000-8100
netsh advfirewall firewall add rule name='Pylon JSON Service' dir=in action=allow protocol=TCP localport=7001-7002
netsh advfirewall firewall add rule name='Pylon JSON Service' dir=in action=allow protocol=TCP localport=8432
netsh advfirewall firewall add rule name='Pylon Updater Service' dir=in action=allow protocol=TCP localport=7009
netsh advfirewall firewall add rule name='Pylon Update Service' dir=in action=allow protocol=TCP localport=10001
netsh advfirewall firewall add rule name='Infomind SSH Tunnel' dir=in action=allow protocol=TCP localport=63664
netsh advfirewall firewall add rule name='MS SQL Server TCP Ports' dir=in action=allow protocol=TCP localport=1433-1434
netsh advfirewall firewall add rule name='MS SQL Server UDP Ports' dir=in action=allow protocol=UDP localport=1434
netsh advfirewall firewall add rule name='Pylon Fiscal Manager' dir=in action=allow protocol=TCP localport=9000
netsh advfirewall firewall add rule name='MS SQL Server Application' dir=in action=allow program='%ProgramFiles%\Microsoft SQL Server\MSSQL13.IMSQL2016\MSSQL\Binn\sqlservr.exe'
netsh advfirewall firewall add rule name='Pylon Fiscal Manager Application' dir=in action=allow program='C:\epsilon net\Pylon Platform\Poseidon.ServiceFiscalManager.exe'
# Outgoing Rules
netsh advfirewall firewall add rule name='Pylon Application Server' dir=out action=allow protocol=TCP localport=8000-8100
netsh advfirewall firewall add rule name='Pylon JSON Service' dir=out action=allow protocol=TCP localport=7001-7002
netsh advfirewall firewall add rule name='Pylon JSON Service' dir=out action=allow protocol=TCP localport=8432
netsh advfirewall firewall add rule name='Pylon Updater Service' dir=out action=allow protocol=TCP localport=7009
netsh advfirewall firewall add rule name='Pylon Update Service' dir=out action=allow protocol=TCP localport=10001
netsh advfirewall firewall add rule name='Infomind SSH Tunnel' dir=out action=allow protocol=TCP localport=63664
netsh advfirewall firewall add rule name='MS SQL Server TCP Ports' dir=out action=allow protocol=TCP localport=1433-1434
netsh advfirewall firewall add rule name='MS SQL Server UDP Ports' dir=out action=allow protocol=UDP localport=1434
netsh advfirewall firewall add rule name='Pylon Fiscal Manager' dir=out action=allow protocol=TCP localport=9000
netsh advfirewall firewall add rule name='MS SQL Server Application' dir=out action=allow program='%ProgramFiles%\Microsoft SQL Server\MSSQL13.IMSQL2016\MSSQL\Binn\sqlservr.exe'
netsh advfirewall firewall add rule name='Pylon Fiscal Manager Application' dir=out action=allow program='C:\epsilon net\Pylon Platform\Poseidon.ServiceFiscalManager.exe'

以上是关于powershell 在Windows桌面上打开防火墙端口的主要内容,如果未能解决你的问题,请参考以下文章

windows8.1里的缺少powershell怎么办

Windows 10右键添加 "在此处打开命令窗口" 菜单

Windows 10右键添加 "在此处打开命令窗口" 菜单

Win8.1启动Windows powershell的两种方法怎么办

powershell 在Windows Server上打开FireWall端口

powershell 使用PowerShell启用Windows远程桌面连接