White Papers

7 No Restrictions | Filter Dialects |
Selector Filter can be used. The selector filter will enable the console to quickly query an instance based
on a “Property=Value” expression.
2.2.1 Combining Selectors
The example in section 2.1, indicates the use of one Selector Filter to filter the instances. However, multiple
selectors can be provided in one Selector Query string for further filtration. The example here indicates the
use of multiple selectors in an enumeration command,
winrm e "http://schemas.dmtf.org/wbem/wscim/1/cim-
schema/2/DCIM_NICView?__cimnamespace=root/dcim" -u:<user> -p:<password> -
r:https://<ip>/wsman -encoding:utf-8 -a:basic -SkipCNcheck -SkipCAcheck -
filter:"{SlotLength = "0004";FunctionNumber = "7" }" -
dialect:http://schemas.dmtf.org/wbem/wsman/1/wsman/SelectorFilter
The above example indicates the use of a string selector along with an integer selector. The instances
that matches SlotLength=”0004” AND FunctionNumber=”7” will be returned.
2.2.2 SOAP Request Format
Following is an example of the SOAP request format for using the selector filter as indicated in the
example in section 2.2.1 .
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"
xmlns:b="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd">
<s:Header>
<a:To>https://<ip>:<port>/wsman</a:To>
<w:ResourceURI
s:mustUnderstand="true">http://schemas.dmtf.org/wbem/wscim/1/cim-
schema/2/DCIM_NICView</w:ResourceURI>
...
</s:Header>
<s:Body>
<n:Enumerate>
...
<w:Filter
Dialect="http://schemas.dmtf.org/wbem/wsman/1/wsman/SelectorFilter">
<wsman:SelectorSet
xmlns:wsman='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
<wsman:Selector Name='SlotLength'>0004</wsman:Selector>
<wsman:Selector Name='FunctionNumber'>7</wsman:Selector>