title: System.ArgumentException: 'Value does not fall within the expected range.'
body: <p>I am collecting Resultant Set of Policies using the Group Policy Management dll. There exist a class <a href="https://docs.microsoft.com/en-us/previous-versions/windows/desktop/wmi_v2/class-library/gprsop-class-microsoft-grouppolicy" rel="nofollow noreferrer">GPRSop</a>, which I use, with the attributes RsopMode and WMI Namspace as a string: </p>
  
  <pre><code>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");
  </code></pre>
  
  <p><code>LoggingMode</code>, <code>LoggingComputer</code> and <code>LoggingUser</code> all throw the same exception: </p>
  
  <blockquote>
    <p>System.ArgumentException: 'Value does not fall within the expected range.'</p>
  </blockquote>
  
  <p>If I set the wmiNamespace " " as recommended, it also throws an exception.</p>