title: Enable UWF via WMI
body: <p>I am writing a program that needs to enable UWF. Unfortunately, I have no experience with the WMI interface and the UWF documentation has no C# or .NET examples.</p>
  
  <p>When I enable UWF, I get an exception: 'Invalid method Parameters(s)'. But, according to the documentation - <a href="https://docs.microsoft.com/en-us/windows-hardware/customize/enterprise/uwf-filter" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows-hardware/customize/enterprise/uwf-filter</a> - Enable does not have input parameters. Passing through null doesn't work neither:</p>
  
  <pre><code>var scope = new ManagementScope(@"root\standardcimv2\embedded");
  var uwfClass = new ManagementClass(scope.Path.Path, "UWF_Filter", null);
  var inputParameters = uwfClass.GetMethodParameters("Enable");
  var result = uwfClass.InvokeMethod("Enable", inputParameters, null);
  </code></pre>