I have a software driver I am trying to automate the WHQL testing on. Manually I would click on Selection->Software Device->select the machine pool->search for driver and check it. Then I would right-click driver and 'Add/Modify Features' and add Filter.Driver.FileSystem.
I have a product instance ($productInstance) where I can GetFeatures() and see it has 3(DeviceGuard, Fundamentals, Security) which are already selected in the manual step above, however I need to also add the FileSystem one to this list. Looking at the API documents I see an AddFeature() which is used to 'add a feature'. It takes a 'Feature' but I can't seem to create a new Feature of type Filter.Driver.FileSystem. to call AddFeature with.
The last 2 lines don't work, but show what I am trying to do. I get a constructor not found exception:
(exception: A constructor was not found. Cannot find an appropriate constructor for type Microsoft.Windows.Kits.Hardware.ObjectModel.Feature. )
I call $ObjectModel = [Reflection.Assembly]::LoadFrom($env:WTTSTDIO + "microsoft.windows.Kits.Hardware.objectmodel.dll") earlier in the code and am able to do things like
[Microsoft.Windows.Kits.Hardware.ObjectModel.ProductInstance]$productInstance = $null
in a parameter statement earlier etc so I know that is loaded.
Any assistance on adding the Filter.Driver.FileSystem feature to my target would be appreciated.
Thank you very much,