question

RussellRamey-7574 avatar image
0 Votes"
RussellRamey-7574 asked FanFan-MSFT commented

GPMC Modeling Wizard Error "The given key was not present in the dictionary."

Running the Group Policy Management Console Modeling Wizard I get the message

"An error occurred while generating report:
The given key was not present in the dictionary."

There is a KB article which is utterly useless in figuring out what key it isn't finding - here[1].

I can get the actual group policy RSoP result successfully by running Get-ResultantSetofPolicy in Powershell on a machine with the policies applied but it would sure be useful to have this tool work (or to actually figure out that I really have a bad/missing key in the group policy database and which one it is).




[1]: https://docs.microsoft.com/en-us/troubleshoot/windows-server/group-policy/cannot-run-group-policy-modeling-wizard


windows-10-generalwindows-group-policy
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

FanFan-MSFT avatar image
0 Votes"
FanFan-MSFT answered FanFan-MSFT commented

Hi,

Since you can get the gpresult by command: gpresult /h report.html on a machine (for a computer configuration, you need to runt the cmd as administrator) , you can check the settings for the registry items under Computer configuration\Preferences\Registry in the report.

Or here is a script to find the entries with no type, just for your reference:
https://stevenwatsonuk.wordpress.com/2016/10/03/group-policy-modelling-the-given-key-was-not-present-in-the-dictionary/(third-party link)

This response contains a third-party link. We provide this link for easy reference. Microsoft cannot guarantee the validity of any information and content in this link.

Best Regards,

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@FanFan-MSFT

Thanks for the reply. A couple of comments:

  • Trivial - your link is broken to the script - you appended the "third-party link" text to the URL

  • Yes, absolutely if I set up and sign in a workstation and user in the right OU's and groups I can get the RSoP and look at the report. The whole point of the Modeling Wizard though is to do "what if" without needing to do that.

  • It wasn't clear to me exactly what a "key not present" meant in this context. I did see this blog and the script when I was looking for a solution but I couldn't find any explanation and I didn't really want to muck around in the Domain Controller registry without understanding how or why it got that way or what it meant. ¯\_(ツ)_/¯


1 Vote 1 ·

Hi,
Or you can just check the content of gpresult, and confirm if the are any registry settings under the GPP.
Just for confirm, don't edit anything.
Best Regards,

0 Votes 0 ·

Hi,
Welcome to share your current situation if there are any updates.
Please feel free to let us know if you need further assistance.
 
Best Regards,

0 Votes 0 ·
Show more comments