PowerShell / DSC

This repo is for the DSC v3 project
MIT License
219 stars 30 forks source link

WMI Adapter updates #475

Open SteveL-MSFT opened 4 months ago

SteveL-MSFT commented 4 months ago

Summary of the new feature / enhancement

Support:

Proposed technical implementation details (optional)

Many WMI classes support methods. We should maybe just have a WMIMethodInvocation metaclass that takes the namespace, class, method name, and a property bag (key/value pairs) that would be the inputs to the method. The only problem with this approach is that the user needs to know all that info.

Alternatively, but would be noisy when listing, is to have dynamic instances returned that represent each method that can be called.

SteveL-MSFT commented 2 months ago

WMI Adapter should use a WMI query if there are properties specified:

type: root.cimv2/Win32_OperatingSyste
properties:
  caption:
  version:
  osarchitecture:
  oslanguage:

This should be turned in to select caption, version, osarchitecture, oslanguage from win32_operatingsystem

SteveL-MSFT commented 2 months ago

When we have support for resources to return metadata, the WMI adapter should return the namespace and class used as metadata