Skip to content

Instantly share code, notes, and snippets.

@AshFlaw
Created November 16, 2018 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AshFlaw/ff89454dd8df4b9c1ec4e3ed5bf38c58 to your computer and use it in GitHub Desktop.
Save AshFlaw/ff89454dd8df4b9c1ec4e3ed5bf38c58 to your computer and use it in GitHub Desktop.
Configure windows firewall to allow Shazam probe discovery
$Servers = Get-ADComputer -Filter 'ObjectClass -eq "Computer"' | Select-Object -Expand DNSHostName
Foreach ($Server in $Servers)
{
invoke-command -ComputerName $Server -ScriptBlock {Set-NetFirewallRule -DisplayGroup 'Remote Event Log Management' -Enabled True -PassThru -EdgeTraversalPolicy Allow | Select-Object DisplayName, Enabled}
invoke-command -ComputerName $Server -ScriptBlock {Set-NetFirewallRule -DisplayGroup "Windows Management Instrumentation (WMI)" -Enabled True -PassThru -EdgeTraversalPolicy Allow -ErrorAction SilentlyContinue | Select-Object DisplayName, Enabled}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment