TransWikia.com

netsh advfirewall can not set group profile

Super User Asked by Bender Bending on November 9, 2021

Windows Server 2008 R2 Standard, 64 bit. Powershell version 5.1.144049.

Trying to use a command from this Microsoft Support Page -> Example 8: Enable specific services

netsh advfirewall firewall set rule group="remote desktop" new enable=Yes profile=private

Returns with

Only the enable parameter can be used to update rules specified by a group.

I need to change the profile of a group of rules, is there a way to do this programmatically or with a one liner?

One Answer

Omit profile=private and it works:

netsh advfirewall firewall set rule group="remote desktop" new enable=Yes

PowerShell one-liner:

Set-NetFirewallRule -DisplayGroup "Remote Desktop" -Enabled True

Answered by Luke Humberdross on November 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP