gwmi -Query "SELECT * FROM Win32_Service WHERE Name LIKE '%Logon%'" (works fine)
returns some set of results,
But when I run a similar query on some other class REF property ex: Win32_DependentService over Antecedent property the query is invalid.
gwmi -Query "select * from Win32_DependentService where Antecedent like '%'" (doesn't work) (this is for example, my intention is not to display all the entries in Win32_DependentService, and I have a proper like clause for that.)
the above one tells the query tells invalid.
Win32_DependentService from MSDN
class Win32_DependentService : CIM_ServiceServiceDependency
{
Win32_BaseService REF Antecedent;
Win32_BaseService REF Dependent;
uint16 TypeOfDependency;
};
gwmi -Query "select * from Win32_DependentService where Antecedent='\\\\XXXXXXX-machine\\root\\cimv2:Win32_SystemDriver.Name=`"ibbus`"'" this gives proper results.
Why is it so? Is it because Antecedent property is REF?
Please tell me the behavior with proper examples if possible, also how to use the 'like' in this case.