-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update WMI adapter to perform query based on provided properties #548
Conversation
@@ -9,10 +9,28 @@ param( | |||
$stdinput | |||
) | |||
|
|||
trap { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to have a comment about what this trap
does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will add comment
adaptertype: | ||
netconnectionid: | ||
serviceName: | ||
netconnectionstatus: 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is my understanding correct that this is the only instance in this file that will use WHERE
clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
PR Summary
Previously, all the properties for a WMI class gets returned. With this change, the specified properties get turned into a query. This can actually improve performance if the WMI provider supports it, but otherwise it also means the output won't have information that the configuration did not request.
If a property has a value, then that value is used as part of the query.
Example output using the updated wmi inventory example:
Also fixed how the adapter writes traces so they show up correctly.
PR Context
Address a part of #475