Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xFirewall throws error when correcting Profile changes #140

Closed
RamonPalmieri opened this issue Aug 29, 2016 · 4 comments
Closed

xFirewall throws error when correcting Profile changes #140

RamonPalmieri opened this issue Aug 29, 2016 · 4 comments
Labels
duplicate The issue or PR is the duplicate of another.

Comments

@RamonPalmieri
Copy link

Hi,

On windows2k12/WMF5.0 I found an issue.
When I create a firewall rule with DSC and later on change the profile settings xFirewall throws an error:

Parameter set cannot be resolved using the specified named parameters.
+ CategoryInfo : InvalidArgument: (:) [], CimException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Set-NetFirewallRule
+ PSComputerName : localhost

Original resource setting:
xFirewall AllowRDP
{
Name = 'Remote Desktop Admin Connections'
DisplayName = 'Remote Desktop Admin Connections'
Group = "DSC - Remote Desktop"
Ensure = 'Present'
Enabled = 'True'
Action = 'Allow'
Profile = 'Domain', 'Private', 'Public'
}

Changed resource settings:
xFirewall AllowRDP
{
Name = 'Remote Desktop Admin Connections'
DisplayName = 'Remote Desktop Admin Connections'
Group = "DSC - Remote Desktop"
Ensure = 'Present'
Enabled = 'True'
Action = 'Allow'
Profile = 'Domain', 'Private'
}

This error also occurs when changing profile settings by GUI and letting DSC correct it.

Greetings,

Ramon.

@PlagueHO
Copy link
Member

Hi @RamonPalmieri - thanks for reporting this. I actually think this is actually the same cause as this issue: #130

We haven't come up with a perfect solution to this problem yet. However, if you remove the Group parameter from your xFirewall configuration they should work fine.

@RamonPalmieri
Copy link
Author

I removed the Group parameter and it works fine!
Thanks.

@kwirkykat kwirkykat added the duplicate The issue or PR is the duplicate of another. label Aug 29, 2016
@Luiz-Monad
Copy link

Wouldn't it work if you just removed "group" like that Luiz-Monad@dbd598e ?

@PlagueHO
Copy link
Member

PlagueHO commented Aug 8, 2017

@byte-666 - Unfortunately I don't think so. Because in this case the error is actually occurring in a different part of the code. Specifically this line: Luiz-Monad@dbd598e#diff-7cd1710b844d68d1e0e70b8edd3736d3R451

It is the call to Set-NetFirewallRule that causes the problem in this case. The problem is that the Set-NetFirewallRule cmdlet only supports the Group parameter as an identifier for the rule(s) that needs to be changed. But in our case we want to update the Group value for the rules matching the Name parameter.

I raised this as a UserVoice issue some time ago, but I doubt it's a high priority one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate The issue or PR is the duplicate of another.
Projects
None yet
Development

No branches or pull requests

4 participants