-
Notifications
You must be signed in to change notification settings - Fork 7
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
RegistryPolicyFile: Conflicting Key When Setting Same Policy For Multiple Target Types #23
Comments
Hi @pyrostew, does using UserConfiguration for the targetType give the desired result for your issue? |
I Tried with the User Configuration as well, but again can only have one instance of the resource because AccountName is not a Key parameter, so at best can only set one group. If the AccountName parameter could take an array of names that would achieve what I need. |
I would have to test to verify but I think if UserConfiguration is the targetType the policy will apply to all users so it would be unnecessary to apply same policy to multiple accounts. Is your scenario that you want to apply a policy to User1, User2, but not User3? |
Oooh I see what you mean, sorry I misunderstood your last comment! I had assumed (perhaps wrongly) that the UserConfiguration would only set the account that is running the config... I can't test at the moment, my environment is having other issues that I'm currently resolving. |
I've managed to test your suggestion, and yes it did apply the configuration to all of the users. So my user case at the moment is fine. It still feels like there is a potential gap if a configuration needed to be applied to a number of specific users or groups. But I'll leave you to stew over the value of that. Thanks for realigning my understanding! |
Details of the scenario you tried and the problem that is occurring
I am trying to set the same user configuration policy for all users of the PC however there is no target type for "All Users" and because the target type is not a Key parameter there can't be multiple instances of the resource with the same parameters named "Key" and "ValueName".
Verbose logs showing the problem
This is the error message:
Suggested solution to the issue
Either add a target type that can add a policy for all users
Update Target Type to be one of the Key parameters
Update the Account Name Parameter to take an array of users and groups.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used
The text was updated successfully, but these errors were encountered: