I am collecting Resultant Set of Policies using the Group Policy Management dll. There exist a class GPRSop, which I use, with the attributes RsopMode and WMI Namspace as a string:
GPRsop test = new GPRsop(RsopMode.Logging, "Root/RSOP");
test.LoggingMode = LoggingMode.Computer;
test.LoggingComputer = "MyComputer";
test.LoggingUser = "domain\\user";
test.CreateQueryResults();
test.GenerateReportToFile(ReportType.Xml, "C:\\Temp\\test.xml");
LoggingMode, LoggingComputer and LoggingUser all throw the same exception:
System.ArgumentException: 'Value does not fall within the expected range.'
If I set the wmiNamespace " " as recommended, it also throws an exception.