Advertisement
PC_Aide

create firewall-rule.ps1

Dec 19th, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2.     SRC https://blogs.msdn.microsoft.com/timomta/2016/11/04/how-do-i-open-ports-with-powershell/
  3.     Elevated : yes
  4.  
  5.     O/P http://pix.toile-libre.org/upload/original/1545263543.png
  6. #>
  7.  
  8. #Syntax
  9. New-NetFirewallRule -DisplayName 'HTTP(S) Inbound' -Profile @('Domain', 'Private') -Direction Inbound -Action Allow -Protocol TCP -LocalPort @('80', '443')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement