Created
November 16, 2018 16:59
-
-
Save AshFlaw/ff89454dd8df4b9c1ec4e3ed5bf38c58 to your computer and use it in GitHub Desktop.
Configure windows firewall to allow Shazam probe discovery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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