New
#21
In order to correctly translate DisplayGroup names across different locales, you need to know their Group strings.
Code:Get-NetFirewallRule | where { $_.DisplayGroup -match 'Network Discovery|File and Printer Sharing' } | select -Unique DisplayGroup,Group DisplayGroup Group ------------ ----- Wi-Fi Direct Network Discovery @FireWallAPI.dll,-36851 Network Discovery @FireWallAPI.dll,-32752 File and Printer Sharing @FireWallAPI.dll,-28502 File and Printer Sharing over SMBDirect @FireWallAPI.dll,-28602
Enabling Network Discovery (-32752) and File and Printer Sharing (-28502) rules in any Windows language:
Code:Set-NetFirewallRule -DisplayGroup (Get-NetFirewallRule | where { $_.Group -match '-32752' } | select -Unique DisplayGroup,Group).DisplayGroup -Enabled True -Profile Private Set-NetFirewallRule -DisplayGroup (Get-NetFirewallRule | where { $_.Group -match '-28502' } | select -Unique DisplayGroup,Group).DisplayGroup -Enabled True -Profile Private