Advertisement
PowerShell_PC_Aide

New-FirewallRule.ps1

May 19th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2. -------------------------------------------------------------------------------------------------------------------------
  3.     SRC:
  4.     Doc.MS:
  5.     Manual: https://ss64.com/ps
  6.     Help: get-help <cmdlet> -online
  7.  
  8.     Elevated: Y
  9.  
  10.     PowerShell ver. 3
  11.  
  12.     GUI:  wf.msc -> https://imgur.com/2WSadxZ  
  13.  
  14.     O/P:
  15.  
  16.     Args:
  17.         -Protocol ICMPv4 | ICMPv6
  18. -------------------------------------------------------------------------------------------------------------------------
  19. ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼
  20.     mp4:
  21. ◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼◼
  22. #>
  23.  
  24. #https://imgur.com/HMr8yJR
  25. new-NetFirewallRule -DisplayName "DHCP Server v4 (UDP-in)" -Description "An inbound rule to allow traffic to the IPv4 Dynamic Host Control Protocol Server. [UDP 69]" -Enabled:true -protocol udp -localPort 69 -program %systemRoot%\system32\svchost.exe -group "DHCP Server" -direction Inbound
  26.  
  27. #
  28. New-NetFirewallRule -DisplayName "Allow inbound ICMPv4" -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress <localsubnet> -Action Allow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement