I'm having trouble specifying a WHERE or LIKE clause on my WMI query to the MicrosoftExchangev2 namespace. This works OK Select * From Exchange_Mailbox Where MailboxDisplayName='MyAlias' This returns no data: Select * From Exchange_Mailbox Where MailboxDisplayName LIKE 'My*' neither does this: Select * From Exchange_Mailbox Where MailboxDisplayName LIKE 'My%' Other options fail too (LIKE '*Alia*', LIKE '%Alia%' etc etc etc) I can use the LIKE clause on the root\CIMv2 namespace wihtout any problems. Does the MicrosoftExchangev2 support the LIKE clause? Can anybody else get it working, specifically with the Exchange_Mailbox class. Regards, Steven
I've never got this to work personally (always Error 80041024) there really isn't that much information in that class to worry about eg you would probably find the performance cost of doing a like query just as high as if you pulled all the data back and filtered it at the client side. Cheers Glen "Insider" wrote in message news:A61FFDD9-6A76-4B12-AC4A-7E9FCA8B3A87@microsoft.com... > I'm having trouble specifying a WHERE or LIKE clause on my WMI query to > the > MicrosoftExchangev2 namespace. > > This works OK > Select * From Exchange_Mailbox Where MailboxDisplayName='MyAlias' > > This returns no data: > Select * From Exchange_Mailbox Where MailboxDisplayName LIKE 'My*' > neither does this: > Select * From Exchange_Mailbox Where MailboxDisplayName LIKE 'My%' > Other options fail too (LIKE '*Alia*', LIKE '%Alia%' etc etc etc) > > I can use the LIKE clause on the root\CIMv2 namespace wihtout any > problems. > > Does the MicrosoftExchangev2 support the LIKE clause? Can anybody else get > it working, specifically with the Exchange_Mailbox class. > > Regards, > Steven