HighTechTalks DotNet Forums  

Problems with LIKE clauses on WMI queries to MicrosoftExchangev2

Dotnet Framework (WMI) microsoft.public.dotnet.framework.wmi


Discuss Problems with LIKE clauses on WMI queries to MicrosoftExchangev2 in the Dotnet Framework (WMI) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?SW5zaWRlcg==?=
 
Posts: n/a

Default Problems with LIKE clauses on WMI queries to MicrosoftExchangev2 - 06-18-2007 , 01:24 PM






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

Reply With Quote
  #2  
Old   
Glen Scales [MVP]
 
Posts: n/a

Default Re: Problems with LIKE clauses on WMI queries to MicrosoftExchangev2 - 06-18-2007 , 07:46 PM






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" <Insider (AT) discussions (DOT) microsoft.com> wrote

Quote:
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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.