Creating firewall excetption using netsh command

这一生的挚爱 提交于 2019-12-08 12:33:20

问题


I am trying to use netsh command to create windows firewall exception. The following command gives Syntex Error. Please advise where to make change.

Thanks

netsh firewall add allowedprogram C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\ sqlservr.exe “SQL Server Windows NT” ENABLE

回答1:


If you are on Vista/Win2008 or up do this:

all at one line, I added linebreaks here for readability:

netsh advfirewall firewall add rule 
          name="SQL Server Windows NT" 
          dir=in 
          action=allow 
          program="C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe " 
          enable=yes

the kb-article detailing the new command.



来源:https://stackoverflow.com/questions/14913010/creating-firewall-excetption-using-netsh-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!