none
Error in GPMC

    Question

  • Hello!

    I'm experiencing a strange problem with GPMC. We have 3 domain controllers, windows server 2012 R2, all latest updates. If I'm trying to open settings for 1 group policy I have an error message "An error occurred while generating report:
    An item with the same key has already been added."

    Steps to reproduce:

    1. Open GPMC

    2. Go to Group policy objects and select group policy

    3. Open Settings tab

    This trouble just with 1 policy. All others are OK. Tried to export settings, create new empty policy and import settings back.

    Any help?

    Thank you!

    Tuesday, January 26, 2016 2:53 PM

Answers

  • Hi,
     
    Am 27.01.2016 um 08:58 schrieb W001fer:
    > Mark, currently I cannot edit any settings inside this GPO. I can open
    > editor, change something, but when open editor again there are old
    > settings. I still don't know what causing this problem.
     
    I had something similar twice with a broken XML file.
    The problem was the content within a XML.
     
    In my case it was GPP Registry, that was causing this issue and
    anothertime it was the taskscheduler.
     
    GPEditor allows you to copy&paste special characters into the settings,
    it seems to save the settings, but when reopening, all settings are
    gone. XML does not allow the same amount of characters, than an registry
    export does.
     
    Which *.xml files are inside the GUID?
    Try to rename one by one to find the one that is causing the issue.
    Probably it is a problem with characters.
     
    Mark
    --
    Mark Heitbrink - MVP Windows Server - Group Policy
     
    GPO Tool: http://www.reg2xml.com - Registry Export File Converter
     
    • Marked as answer by W001fer Wednesday, January 27, 2016 10:27 AM
    Wednesday, January 27, 2016 9:26 AM
  • Mark, thank you for advice! Problem was in internet settings xml file within user policy. One of our administrators edited it manually in text editor. Restoring file solved our problem.
    • Marked as answer by W001fer Wednesday, January 27, 2016 10:29 AM
    Wednesday, January 27, 2016 10:29 AM

All replies

  • Hi,
     
    Am 26.01.2016 um 15:53 schrieb W001fer:
    > This trouble just with 1 policy. All others are OK. Tried to export
    > settings, create new empty policy and import settings back.
     
    Sounds like File replication problem. The SYSVOL Part of the Policy is
    not on the server the GPMC connects to ... check:
     
    \\yourDC\sysvol\yourdomain\policies for every of the 3 DCs.
     
    Mark
    --
    Mark Heitbrink - MVP Windows Server - Group Policy
     
    GPO Tool: http://www.reg2xml.com - Registry Export File Converter
     
    Tuesday, January 26, 2016 3:24 PM
  • Hello, Mark!

    Thank you for reply!

    I have this problem on any of my DC's. And yes, folder with policy UID is presented on all of them in sysvol share.

    Tuesday, January 26, 2016 3:32 PM
  • Am 26.01.2016 um 16:32 schrieb W001fer:
    > folder with policy UID is presented on all of them in sysvol share.
     
    I found this one:
    You experience a GPO report-generation issue in the GPMC window when you
    try to generate the report in a localized version of Windows 7 or of
    Windows Server 2008 R2
     
    Mark
    --
    Mark Heitbrink - MVP Windows Server - Group Policy
     
    GPO Tool: http://www.reg2xml.com - Registry Export File Converter
     
    Tuesday, January 26, 2016 3:42 PM
  • Yes, I've found this one too :) But in my case I have Server 2012R2 and Windows 8.1 as a client OS. Unfortunately in KB only fixes for 2008 R2 and Windows 7
    Tuesday, January 26, 2016 3:53 PM
  • Am 26.01.2016 um 16:53 schrieb W001fer:
    > Yes, I've found this one too :) But in my case I have Server 2012R2 and
    > Windows 8.1 as a client OS. Unfortunately in KB only fixes for 2008 R2
    > and Windows 7
     
    ... but you are running a localized version of GPMC and there is no
    error when usind a native english OS? (Simple test in a virtual environment)
     
    Mark
    --
    Mark Heitbrink - MVP Windows Server - Group Policy
     
    GPO Tool: http://www.reg2xml.com - Registry Export File Converter
     
    Tuesday, January 26, 2016 4:19 PM
  • We're using native english version of OS, just with russian regional settings (date-time,currency etc.)
    Tuesday, January 26, 2016 4:32 PM
  • Am 26.01.2016 um 17:32 schrieb W001fer:
    > We're using native english version of OS, just with russian regional
    > settings (date-time,currency etc.)
     
    Strange. Do you which settings are inside the GPO, that is causing the
    problem?
    Can you still edit all settings, that are inside?
     --
    Mark Heitbrink - MVP Windows Server - Group Policy
     
    GPO Tool: http://www.reg2xml.com - Registry Export File Converter
     
    Tuesday, January 26, 2016 8:03 PM
  • Hi,

    Are there any related errors in Event Viewer?

    If yes, please post them for further research.

    Best Regards,

    Jay


    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, January 27, 2016 5:01 AM
    Moderator
  • Mark, currently I cannot edit any settings inside this GPO. I can open editor, change something, but when open editor again there are old settings. I still don't know what causing this problem.
    Wednesday, January 27, 2016 7:58 AM
  • Hi, Jay!

    Thank for reply! No, there aren't any errors or warnings in event viewer related to this problem.

    Wednesday, January 27, 2016 7:59 AM
  • > to open settings for 1 group policy I have an error message "An error
    > occurred while generating report:
    > An item with the same key has already been added."
     
    And possibly GPEdit logging:
     
     
    Wednesday, January 27, 2016 8:57 AM
  • Hi,
     
    Am 27.01.2016 um 08:58 schrieb W001fer:
    > Mark, currently I cannot edit any settings inside this GPO. I can open
    > editor, change something, but when open editor again there are old
    > settings. I still don't know what causing this problem.
     
    I had something similar twice with a broken XML file.
    The problem was the content within a XML.
     
    In my case it was GPP Registry, that was causing this issue and
    anothertime it was the taskscheduler.
     
    GPEditor allows you to copy&paste special characters into the settings,
    it seems to save the settings, but when reopening, all settings are
    gone. XML does not allow the same amount of characters, than an registry
    export does.
     
    Which *.xml files are inside the GUID?
    Try to rename one by one to find the one that is causing the issue.
    Probably it is a problem with characters.
     
    Mark
    --
    Mark Heitbrink - MVP Windows Server - Group Policy
     
    GPO Tool: http://www.reg2xml.com - Registry Export File Converter
     
    • Marked as answer by W001fer Wednesday, January 27, 2016 10:27 AM
    Wednesday, January 27, 2016 9:26 AM
  • Hi, Martin!

    Thank for reply! In gpmgmt.log I've found following error

    [242f4.1ff14]  1/27/2016 12:26:50:686  [VERBOSE] CGPM::WaitForReportFactoryInitThreadToBeScheduled() : Starting WaitForSingleObject.
    [242f4.1ff14]  1/27/2016 12:26:50:687  [VERBOSE] CGPM::WaitForReportFactoryInitThreadToBeScheduled() : Completed WaitForSingleObject.
    [242f4.1ff14]  1/27/2016 12:26:50:688  [VERBOSE] CGPMReport::GetReportFactoryObject: Reporting object is already created.
    [242f4.1ff14]  1/27/2016 12:26:50:689  [VERBOSE] CGPMReport::GetReportFactoryObject: Reporting object ref count = 2.
    [242f4.1ff14]  1/27/2016 12:26:52:275  [VERBOSE] CGPMReport::ReleaseReportFactoryObject: Reporting object ref count = 1.
    [242f4.1ff14]  1/27/2016 12:26:52:328  [WARNING] CGPMReport::GenerateReport :ConvertToXml/Html failed with 0x80070057.
    [242f4.1ff14]  1/27/2016 12:26:52:330  [WARNING] CGPMReport::GenerateReportFromGPO : GenerateReport failed with 0x80070057


    Wednesday, January 27, 2016 9:36 AM
  • Mark, thank you for advice! Problem was in internet settings xml file within user policy. One of our administrators edited it manually in text editor. Restoring file solved our problem.
    • Marked as answer by W001fer Wednesday, January 27, 2016 10:29 AM
    Wednesday, January 27, 2016 10:29 AM
  • > CGPMReport::GenerateReport :ConvertToXml/Html failed with 0x80070057.
     
    As usual - a lot of output, nothing valuable... This simply means
    "invalid parameter" :()
     
    As Mark said: Now it seems to be the time to inspect the Sysvol contents
    for this GPO. Something there has gone wrong.
     
    Wednesday, January 27, 2016 10:33 AM
  • > One of our administrators edited it manually in text editor.
     
    No problem with that - unless he doesn't know what he's doing :)
     
    Wednesday, January 27, 2016 11:11 AM
  • Hi,
     
    Am 27.01.2016 um 11:29 schrieb W001fer:
    > Mark, thank you for advice! Problem was in internet settings xml file
    >  within user policy. One of our administrators edited it manually in
    > text editor.
     
    Oh, ok. That was easy to solve :-)
     
    To avoid this, deploy an alternate notepad with syntax highlighting for
    XML files like notepad++, pspad etc.
    This does not prevent "bulls**t" inside, but it will have the correct
    syntax :-D
     
    In general editing the XML is not a problem, I do this a lot.
     
    Mark
    --
    Mark Heitbrink - MVP Windows Server - Group Policy
     
    GPO Tool: http://www.reg2xml.com - Registry Export File Converter
     
    Thursday, January 28, 2016 9:06 AM