Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.