“Unable to cast object of type ‘System.String’ to type ‘Microsoft.Group.Policy.Reporting.Extensions.Registry.RegistryValue’.” error message when you try to generate a report for a GPO
Consider the following scenario:
- You have a computer that is running one of the following operating systems:
- Windows Vista
- Windows Server 2008
- Windows 7
- Windows Server 2008 R2
- You use the Group Policy Management Console (GPMC) to connect to a domain controller from the computer.
- You select a Group Policy object (GPO), and then you disable the Windows Firewall:
Allow Logging Group Policy setting in the following path:
Computer Configuration\Administrative Templates\Network\Network Connections\Windows Firewall\Domain Profile
- You try to generate a report for the GPO in GPMC.
In this scenario, you receive the following error message:
An error occurred while generating report:
Unable to cast object of type ‘System.String’ to type ‘Microsoft.Group.Policy.Reporting.Extensions.Registry.RegistryValue’.
Note: You can use either of the following methods to generate a report for a GPO in the GPMC MMC snap-in:
- Method 1: Select the Group Policy object, and then click the Settings tab in the panel on the right side.
- Method 2: Run the Group Policy Results Wizard.
For more information on this issue, including potential causes, workarounds, and resolutions, see: Microsoft KB Article KB2409336.