Skip to content

Instantly share code, notes, and snippets.

@snobu
Created August 21, 2014 20:28
Show Gist options
  • Select an option

  • Save snobu/3b4a9d7791f4a18f1dd9 to your computer and use it in GitHub Desktop.

Select an option

Save snobu/3b4a9d7791f4a18f1dd9 to your computer and use it in GitHub Desktop.
SetScript = {
$rules = 'File and Printer Sharing (Echo Request - ICMPv6-In)',
'File and Printer Sharing (Echo Request - ICMPv4-In)'
$rules.ForEach({
$netsh = "netsh.exe --% advfirewall firewall set rule name=`"$_`" new enable=YES"
invoke-expression -Command ($netsh)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment