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.
When I enable UWF, I get an exception: 'Invalid method Parameters(s)'. But, according to the documentation - https://learn.microsoft.com/en-us/windows-hardware/customize/enterprise/uwf-filter - Enable does not have input parameters. Passing through null doesn't work neither:
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);