|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Read Emails on Exchange server without OL clientIs there a way, with VS 2005 and FX 2.0, to read a given inbox? I need to
write a 'monitor' program and my boss is convinced, as is always his first gut reaction, that we need to go buy a 3rd-party package to just read an inbox. He may be right this time, but that's not usually my first gut reaction--we've had too many good employees around here fired 'cause they spent too much money on albatross software (another soapbox, sorry). I need to write this monitor program in a very generic way, i.e. without Outlook interfaces, but surely there's a generic way to do it with the FX 2.0, right? TIA! -- TFWBWY...A
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_exch2k_using_store_events.asp
--
Show quote
Hide quote
Get a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message
news:%23rmXJtFcGHA.3504@TK2MSFTNGP04.phx.gbl... > Is there a way, with VS 2005 and FX 2.0, to read a given inbox? I need to > write a 'monitor' program and my boss is convinced, as is always his first > gut reaction, that we need to go buy a 3rd-party package to just read an > inbox. He may be right this time, but that's not usually my first gut > reaction--we've had too many good employees around here fired 'cause they > spent too much money on albatross software (another soapbox, sorry). I > need to write this monitor program in a very generic way, i.e. without > Outlook interfaces, but surely there's a generic way to do it with the FX > 2.0, right? > > TIA! > > -- > TFWBWY...A > I, and my boss, were thinking of just writing a program to run on a
scheduled task about every 10 minutes to monitor this certain inbox. Is there something in the Framework to just read, generically, of course, the basic information about an inbox item? For example, I want to read all the items in the inbox and see if there is anything there that is older than 10 minutes (these people are paranoid) and just send off an email alert to one or more people based on what I find. I don't know if I want to go writing Event Sinks, but perhaps that would be what it takes. It just seems that this is almost too generic of a task to do to go and spend money on a TPP that just reads an inbox. I could do that in VB6 without Outlook hooks and without spending any money (in fact, I did it about 3 years ago). Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:%2362xxyFcGHA.3900@TK2MSFTNGP05.phx.gbl... > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_exch2k_using_store_events.asp > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:%23rmXJtFcGHA.3504@TK2MSFTNGP04.phx.gbl... >> Is there a way, with VS 2005 and FX 2.0, to read a given inbox? I need >> to write a 'monitor' program and my boss is convinced, as is always his >> first gut reaction, that we need to go buy a 3rd-party package to just >> read an inbox. He may be right this time, but that's not usually my >> first gut reaction--we've had too many good employees around here fired >> 'cause they spent too much money on albatross software (another soapbox, >> sorry). I need to write this monitor program in a very generic way, i.e. >> without Outlook interfaces, but surely there's a generic way to do it >> with the FX 2.0, right? >> >> TIA! >> >> -- >> TFWBWY...A >> > > There is but I need to think about this. I hope you have some time. It will
take some doing. Kelly -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:uh1WDAGcGHA.3504@TK2MSFTNGP04.phx.gbl... > I, and my boss, were thinking of just writing a program to run on a > scheduled task about every 10 minutes to monitor this certain inbox. Is > there something in the Framework to just read, generically, of course, the > basic information about an inbox item? For example, I want to read all the > items in the inbox and see if there is anything there that is older than > 10 minutes (these people are paranoid) and just send off an email alert to > one or more people based on what I find. I don't know if I want to go > writing Event Sinks, but perhaps that would be what it takes. It just > seems that this is almost too generic of a task to do to go and spend > money on a TPP that just reads an inbox. I could do that in VB6 without > Outlook hooks and without spending any money (in fact, I did it about 3 > years ago). > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:%2362xxyFcGHA.3900@TK2MSFTNGP05.phx.gbl... >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_exch2k_using_store_events.asp >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:%23rmXJtFcGHA.3504@TK2MSFTNGP04.phx.gbl... >>> Is there a way, with VS 2005 and FX 2.0, to read a given inbox? I need >>> to write a 'monitor' program and my boss is convinced, as is always his >>> first gut reaction, that we need to go buy a 3rd-party package to just >>> read an inbox. He may be right this time, but that's not usually my >>> first gut reaction--we've had too many good employees around here fired >>> 'cause they spent too much money on albatross software (another soapbox, >>> sorry). I need to write this monitor program in a very generic way, >>> i.e. without Outlook interfaces, but surely there's a generic way to do >>> it with the FX 2.0, right? >>> >>> TIA! >>> >>> -- >>> TFWBWY...A >>> >> >> > > vbnetdev wrote:
> There is but I need to think about this. I hope you have some time. It will Well, I wish someone knew.> take some doing. > > Kelly > Microsoft literature states that Office should not be used for background automation (only enhancing the client driven UI). But what is to be used for these kinds of tasks remains unanswered? In theory, Exchange is a database, with highly structured objects. I should be able to log into it, read and manipulate these objects with a server connection, either via an API or through some type of SOAP protocol. lots to find on google : ldap , cdoex , exoledb , webdav
Show quoteHide quote "John A. Bailo" <jaba***@texeme.com> wrote in message news:445B9B37.40507@texeme.com... > vbnetdev wrote: > > There is but I need to think about this. I hope you have some time. It will > > take some doing. > > > > Kelly > > > > Well, I wish someone knew. > > Microsoft literature states that Office should not be used for > background automation (only enhancing the client driven UI). > > But what is to be used for these kinds of tasks remains unanswered? > > In theory, Exchange is a database, with highly structured objects. > > I should be able to log into it, read and manipulate these objects with > a server connection, either via an API or through some type of SOAP > protocol. > > Chris Dunaway wrote:
> Perhaps this will help: That's pop3, not exchange.> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp > exchange supports pop3 & imap
"John A. Bailo" <jaba***@texeme.com> wrote in message http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.aspnews:445B9ACD.8060908@texeme.com... > Chris Dunaway wrote: > > Perhaps this will help: > > > > Show quoteHide quote > > > > That's pop3, not exchange. This looks awfully close to what I need. I will be anxious to see Kelly's
response as well, but this looks real good. Thanx! Show quoteHide quote "Chris Dunaway" <dunaw***@gmail.com> wrote in message news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... > Perhaps this will help: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp > Bryan,
still working on your issue. Would you say a mailbox greater than the size of 0 would want your attention? Kelly -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... > This looks awfully close to what I need. I will be anxious to see Kelly's > response as well, but this looks real good. > > Thanx! > > "Chris Dunaway" <dunaw***@gmail.com> wrote in message > news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >> Perhaps this will help: >> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >> > > I guess I don't follow...
Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:%23y8O7fHcGHA.3888@TK2MSFTNGP02.phx.gbl... > Bryan, > > still working on your issue. Would you say a mailbox greater than the size > of 0 would want your attention? > > Kelly > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >> This looks awfully close to what I need. I will be anxious to see >> Kelly's response as well, but this looks real good. >> >> Thanx! >> >> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>> Perhaps this will help: >>> >>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>> >> >> > > Imports System
Imports System.Management Imports System.Windows.Forms Namespace VIKINGSSUCK Public Class THEPACKERSROCK Function HELPMENOW() Dim searcher As New ManagementObjectSearcher( _ "root\MicrosoftExchangeV2", _ "SELECT * FROM Exchange_Mailbox WHERE MailboxDisplayName = 'Joe Schmo'") For Each queryObj As ManagementObject in searcher.Get() Console.WriteLine("MailboxDisplayName: {0}", queryObj("MailboxDisplayName")) Console.WriteLine("Size: {0}", queryObj("Size")) Console.WriteLine("TotalItems: {0}", queryObj("TotalItems")) Next 'if size or totalitems > 0 Then send an email to somebody here. End Function End Class End Namespace -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... > This looks awfully close to what I need. I will be anxious to see Kelly's > response as well, but this looks real good. > > Thanx! > > "Chris Dunaway" <dunaw***@gmail.com> wrote in message > news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >> Perhaps this will help: >> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >> > > I'll give this a shot.
Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... > Imports System > Imports System.Management > Imports System.Windows.Forms > > Namespace VIKINGSSUCK > > Public Class THEPACKERSROCK > > Function HELPMENOW() > > Dim searcher As New ManagementObjectSearcher( _ > "root\MicrosoftExchangeV2", _ > "SELECT * FROM Exchange_Mailbox WHERE > MailboxDisplayName = 'Joe Schmo'") > > For Each queryObj As ManagementObject in searcher.Get() > Console.WriteLine("MailboxDisplayName: {0}", > queryObj("MailboxDisplayName")) > Console.WriteLine("Size: {0}", queryObj("Size")) > Console.WriteLine("TotalItems: {0}", > queryObj("TotalItems")) > Next > 'if size or totalitems > 0 Then send an email to somebody here. > > End Function > End Class > End Namespace > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >> This looks awfully close to what I need. I will be anxious to see >> Kelly's response as well, but this looks real good. >> >> Thanx! >> >> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>> Perhaps this will help: >>> >>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>> >> >> > > Maybe I got your posts out of order.
You don't follow this code sample? Did you reference System.Management? -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:%236P0k0HcGHA.4224@TK2MSFTNGP04.phx.gbl... > I'll give this a shot. > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >> Imports System >> Imports System.Management >> Imports System.Windows.Forms >> >> Namespace VIKINGSSUCK >> >> Public Class THEPACKERSROCK >> >> Function HELPMENOW() >> >> Dim searcher As New ManagementObjectSearcher( _ >> "root\MicrosoftExchangeV2", _ >> "SELECT * FROM Exchange_Mailbox WHERE >> MailboxDisplayName = 'Joe Schmo'") >> >> For Each queryObj As ManagementObject in searcher.Get() >> Console.WriteLine("MailboxDisplayName: {0}", >> queryObj("MailboxDisplayName")) >> Console.WriteLine("Size: {0}", queryObj("Size")) >> Console.WriteLine("TotalItems: {0}", >> queryObj("TotalItems")) >> Next >> 'if size or totalitems > 0 Then send an email to somebody here. >> >> End Function >> End Class >> End Namespace >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>> This looks awfully close to what I need. I will be anxious to see >>> Kelly's response as well, but this looks real good. >>> >>> Thanx! >>> >>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>> Perhaps this will help: >>>> >>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>> >>> >>> >> >> > > I saw your other post doing the SELECT from Exchange_Mailbox and answered
that one. Where do you go to find the field names that Exchange uses? Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:unQ4%236HcGHA.1324@TK2MSFTNGP04.phx.gbl... > Maybe I got your posts out of order. > > You don't follow this code sample? Did you reference System.Management? > > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:%236P0k0HcGHA.4224@TK2MSFTNGP04.phx.gbl... >> I'll give this a shot. >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>> Imports System >>> Imports System.Management >>> Imports System.Windows.Forms >>> >>> Namespace VIKINGSSUCK >>> >>> Public Class THEPACKERSROCK >>> >>> Function HELPMENOW() >>> >>> Dim searcher As New ManagementObjectSearcher( _ >>> "root\MicrosoftExchangeV2", _ >>> "SELECT * FROM Exchange_Mailbox WHERE >>> MailboxDisplayName = 'Joe Schmo'") >>> >>> For Each queryObj As ManagementObject in searcher.Get() >>> Console.WriteLine("MailboxDisplayName: {0}", >>> queryObj("MailboxDisplayName")) >>> Console.WriteLine("Size: {0}", queryObj("Size")) >>> Console.WriteLine("TotalItems: {0}", >>> queryObj("TotalItems")) >>> Next >>> 'if size or totalitems > 0 Then send an email to somebody here. >>> >>> End Function >>> End Class >>> End Namespace >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>> This looks awfully close to what I need. I will be anxious to see >>>> Kelly's response as well, but this looks real good. >>>> >>>> Thanx! >>>> >>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>> Perhaps this will help: >>>>> >>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>> >>>> >>>> >>> >>> >> >> > > I am not sure what you are asking.
Did the code sample solve your dilemma if knowing if the mailbox is empty? Kelly -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:esL33MIcGHA.5116@TK2MSFTNGP04.phx.gbl... >I saw your other post doing the SELECT from Exchange_Mailbox and answered >that one. Where do you go to find the field names that Exchange uses? > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:unQ4%236HcGHA.1324@TK2MSFTNGP04.phx.gbl... >> Maybe I got your posts out of order. >> >> You don't follow this code sample? Did you reference System.Management? >> >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:%236P0k0HcGHA.4224@TK2MSFTNGP04.phx.gbl... >>> I'll give this a shot. >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>> Imports System >>>> Imports System.Management >>>> Imports System.Windows.Forms >>>> >>>> Namespace VIKINGSSUCK >>>> >>>> Public Class THEPACKERSROCK >>>> >>>> Function HELPMENOW() >>>> >>>> Dim searcher As New ManagementObjectSearcher( _ >>>> "root\MicrosoftExchangeV2", _ >>>> "SELECT * FROM Exchange_Mailbox WHERE >>>> MailboxDisplayName = 'Joe Schmo'") >>>> >>>> For Each queryObj As ManagementObject in searcher.Get() >>>> Console.WriteLine("MailboxDisplayName: {0}", >>>> queryObj("MailboxDisplayName")) >>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>> Console.WriteLine("TotalItems: {0}", >>>> queryObj("TotalItems")) >>>> Next >>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>> >>>> End Function >>>> End Class >>>> End Namespace >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>> This looks awfully close to what I need. I will be anxious to see >>>>> Kelly's response as well, but this looks real good. >>>>> >>>>> Thanx! >>>>> >>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>> Perhaps this will help: >>>>>> >>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > replace below with
MsgBox(queryObj("Size")) MsgBox(queryObj("TotalItems")) replace this. I am sorry doing it on the fly. Console.WriteLine("MailboxDisplayName: {0}", queryObj("MailboxDisplayName")) Console.WriteLine("Size: {0}", queryObj("Size")) Console.WriteLine("TotalItems: {0}", queryObj("TotalItems")) -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "vbnetdev" <vbnetdev@community.nospam> wrote in message news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... > Imports System > Imports System.Management > Imports System.Windows.Forms > > Namespace VIKINGSSUCK > > Public Class THEPACKERSROCK > > Function HELPMENOW() > > Dim searcher As New ManagementObjectSearcher( _ > "root\MicrosoftExchangeV2", _ > "SELECT * FROM Exchange_Mailbox WHERE > MailboxDisplayName = 'Joe Schmo'") > > For Each queryObj As ManagementObject in searcher.Get() > Console.WriteLine("MailboxDisplayName: {0}", > queryObj("MailboxDisplayName")) > Console.WriteLine("Size: {0}", queryObj("Size")) > Console.WriteLine("TotalItems: {0}", > queryObj("TotalItems")) > Next > 'if size or totalitems > 0 Then send an email to somebody here. > > End Function > End Class > End Namespace > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >> This looks awfully close to what I need. I will be anxious to see >> Kelly's response as well, but this looks real good. >> >> Thanx! >> >> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>> Perhaps this will help: >>> >>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>> >> >> > > I'm getting "Invalid Namespace" from the System.Management namespace. What
am I not doing right? Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... > replace below with > > MsgBox(queryObj("Size")) > > MsgBox(queryObj("TotalItems")) > > > replace this. I am sorry doing it on the fly. > > Console.WriteLine("MailboxDisplayName: {0}", > queryObj("MailboxDisplayName")) > Console.WriteLine("Size: {0}", queryObj("Size")) > Console.WriteLine("TotalItems: {0}", > queryObj("TotalItems")) > > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >> Imports System >> Imports System.Management >> Imports System.Windows.Forms >> >> Namespace VIKINGSSUCK >> >> Public Class THEPACKERSROCK >> >> Function HELPMENOW() >> >> Dim searcher As New ManagementObjectSearcher( _ >> "root\MicrosoftExchangeV2", _ >> "SELECT * FROM Exchange_Mailbox WHERE >> MailboxDisplayName = 'Joe Schmo'") >> >> For Each queryObj As ManagementObject in searcher.Get() >> Console.WriteLine("MailboxDisplayName: {0}", >> queryObj("MailboxDisplayName")) >> Console.WriteLine("Size: {0}", queryObj("Size")) >> Console.WriteLine("TotalItems: {0}", >> queryObj("TotalItems")) >> Next >> 'if size or totalitems > 0 Then send an email to somebody here. >> >> End Function >> End Class >> End Namespace >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>> This looks awfully close to what I need. I will be anxious to see >>> Kelly's response as well, but this looks real good. >>> >>> Thanx! >>> >>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>> Perhaps this will help: >>>> >>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>> >>> >>> >> >> > > Add a reference to system.management
Kelly P.S. dropped an email in your box you have listed for email -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... > I'm getting "Invalid Namespace" from the System.Management namespace. > What am I not doing right? > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >> replace below with >> >> MsgBox(queryObj("Size")) >> >> MsgBox(queryObj("TotalItems")) >> >> >> replace this. I am sorry doing it on the fly. >> >> Console.WriteLine("MailboxDisplayName: {0}", >> queryObj("MailboxDisplayName")) >> Console.WriteLine("Size: {0}", queryObj("Size")) >> Console.WriteLine("TotalItems: {0}", >> queryObj("TotalItems")) >> >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>> Imports System >>> Imports System.Management >>> Imports System.Windows.Forms >>> >>> Namespace VIKINGSSUCK >>> >>> Public Class THEPACKERSROCK >>> >>> Function HELPMENOW() >>> >>> Dim searcher As New ManagementObjectSearcher( _ >>> "root\MicrosoftExchangeV2", _ >>> "SELECT * FROM Exchange_Mailbox WHERE >>> MailboxDisplayName = 'Joe Schmo'") >>> >>> For Each queryObj As ManagementObject in searcher.Get() >>> Console.WriteLine("MailboxDisplayName: {0}", >>> queryObj("MailboxDisplayName")) >>> Console.WriteLine("Size: {0}", queryObj("Size")) >>> Console.WriteLine("TotalItems: {0}", >>> queryObj("TotalItems")) >>> Next >>> 'if size or totalitems > 0 Then send an email to somebody here. >>> >>> End Function >>> End Class >>> End Namespace >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>> This looks awfully close to what I need. I will be anxious to see >>>> Kelly's response as well, but this looks real good. >>>> >>>> Thanx! >>>> >>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>> Perhaps this will help: >>>>> >>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>> >>>> >>>> >>> >>> >> >> > > Already did that. Would posting a copy of my code help?
----------------------------------------------------------------------- Dim search As New ManagementObjectSearcher("root\MicrosoftExchangeV2", _ "SELECT * FROM Exchange_Mailbox WHERE MailboxDisplayName = 'AR'") Try For Each objFound As ManagementObject In search.Get txtStatus.AppendText("MailboxDisplayName: " & objFound("MailboxDisplayName") & vbTab & _ "Size : " & objFound("Size") & vbTab & _ "Total Items : " & objFound("TotalItems") & vbNewLine) Next txtStatus.AppendText(vbNewLine & "Done.") Catch ex As Exception MsgBox("Error: " & ex.Message.ToString & " in " & ex.Source.ToString) End Try ----------------------------------------------------------------------- I really do appreciate your help! Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... > Add a reference to system.management > > Kelly > > P.S. dropped an email in your box you have listed for email > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >> I'm getting "Invalid Namespace" from the System.Management namespace. >> What am I not doing right? >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>> replace below with >>> >>> MsgBox(queryObj("Size")) >>> >>> MsgBox(queryObj("TotalItems")) >>> >>> >>> replace this. I am sorry doing it on the fly. >>> >>> Console.WriteLine("MailboxDisplayName: {0}", >>> queryObj("MailboxDisplayName")) >>> Console.WriteLine("Size: {0}", queryObj("Size")) >>> Console.WriteLine("TotalItems: {0}", >>> queryObj("TotalItems")) >>> >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>> Imports System >>>> Imports System.Management >>>> Imports System.Windows.Forms >>>> >>>> Namespace VIKINGSSUCK >>>> >>>> Public Class THEPACKERSROCK >>>> >>>> Function HELPMENOW() >>>> >>>> Dim searcher As New ManagementObjectSearcher( _ >>>> "root\MicrosoftExchangeV2", _ >>>> "SELECT * FROM Exchange_Mailbox WHERE >>>> MailboxDisplayName = 'Joe Schmo'") >>>> >>>> For Each queryObj As ManagementObject in searcher.Get() >>>> Console.WriteLine("MailboxDisplayName: {0}", >>>> queryObj("MailboxDisplayName")) >>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>> Console.WriteLine("TotalItems: {0}", >>>> queryObj("TotalItems")) >>>> Next >>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>> >>>> End Function >>>> End Class >>>> End Namespace >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>> This looks awfully close to what I need. I will be anxious to see >>>>> Kelly's response as well, but this looks real good. >>>>> >>>>> Thanx! >>>>> >>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>> Perhaps this will help: >>>>>> >>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > let me know if you did what the screenshot in your email showed.
-- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... > Already did that. Would posting a copy of my code help? > ----------------------------------------------------------------------- > Dim search As New > ManagementObjectSearcher("root\MicrosoftExchangeV2", _ > "SELECT * FROM Exchange_Mailbox WHERE > MailboxDisplayName = 'AR'") > > Try > For Each objFound As ManagementObject In search.Get > txtStatus.AppendText("MailboxDisplayName: " & > objFound("MailboxDisplayName") & vbTab & _ > "Size : " & objFound("Size") > & vbTab & _ > "Total Items : " & > objFound("TotalItems") & vbNewLine) > Next > txtStatus.AppendText(vbNewLine & "Done.") > Catch ex As Exception > MsgBox("Error: " & ex.Message.ToString & " in " & > ex.Source.ToString) > End Try > ----------------------------------------------------------------------- > I really do appreciate your help! > > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >> Add a reference to system.management >> >> Kelly >> >> P.S. dropped an email in your box you have listed for email >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>> I'm getting "Invalid Namespace" from the System.Management namespace. >>> What am I not doing right? >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>> replace below with >>>> >>>> MsgBox(queryObj("Size")) >>>> >>>> MsgBox(queryObj("TotalItems")) >>>> >>>> >>>> replace this. I am sorry doing it on the fly. >>>> >>>> Console.WriteLine("MailboxDisplayName: {0}", >>>> queryObj("MailboxDisplayName")) >>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>> Console.WriteLine("TotalItems: {0}", >>>> queryObj("TotalItems")) >>>> >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>> Imports System >>>>> Imports System.Management >>>>> Imports System.Windows.Forms >>>>> >>>>> Namespace VIKINGSSUCK >>>>> >>>>> Public Class THEPACKERSROCK >>>>> >>>>> Function HELPMENOW() >>>>> >>>>> Dim searcher As New ManagementObjectSearcher( _ >>>>> "root\MicrosoftExchangeV2", _ >>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>> MailboxDisplayName = 'Joe Schmo'") >>>>> >>>>> For Each queryObj As ManagementObject in searcher.Get() >>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>> queryObj("MailboxDisplayName")) >>>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>>> Console.WriteLine("TotalItems: {0}", >>>>> queryObj("TotalItems")) >>>>> Next >>>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>>> >>>>> End Function >>>>> End Class >>>>> End Namespace >>>>> >>>>> -- >>>>> Get a powerful web, database, application, and email hosting with KJM >>>>> Solutions >>>>> http://www.kjmsolutions.com >>>>> >>>>> >>>>> >>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>> This looks awfully close to what I need. I will be anxious to see >>>>>> Kelly's response as well, but this looks real good. >>>>>> >>>>>> Thanx! >>>>>> >>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>> Perhaps this will help: >>>>>>> >>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Yes, I did add a reference to System.Management, but I'm still getting the
error. Is it a permissions error that I can't do a query like that against the Active Directory? Or is Active Directory not even in this picture? Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... > let me know if you did what the screenshot in your email showed. > > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >> Already did that. Would posting a copy of my code help? >> ----------------------------------------------------------------------- >> Dim search As New >> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >> "SELECT * FROM Exchange_Mailbox WHERE >> MailboxDisplayName = 'AR'") >> >> Try >> For Each objFound As ManagementObject In search.Get >> txtStatus.AppendText("MailboxDisplayName: " & >> objFound("MailboxDisplayName") & vbTab & _ >> "Size : " & objFound("Size") >> & vbTab & _ >> "Total Items : " & >> objFound("TotalItems") & vbNewLine) >> Next >> txtStatus.AppendText(vbNewLine & "Done.") >> Catch ex As Exception >> MsgBox("Error: " & ex.Message.ToString & " in " & >> ex.Source.ToString) >> End Try >> ----------------------------------------------------------------------- >> I really do appreciate your help! >> >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>> Add a reference to system.management >>> >>> Kelly >>> >>> P.S. dropped an email in your box you have listed for email >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>> I'm getting "Invalid Namespace" from the System.Management namespace. >>>> What am I not doing right? >>>> >>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>> replace below with >>>>> >>>>> MsgBox(queryObj("Size")) >>>>> >>>>> MsgBox(queryObj("TotalItems")) >>>>> >>>>> >>>>> replace this. I am sorry doing it on the fly. >>>>> >>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>> queryObj("MailboxDisplayName")) >>>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>>> Console.WriteLine("TotalItems: {0}", >>>>> queryObj("TotalItems")) >>>>> >>>>> >>>>> -- >>>>> Get a powerful web, database, application, and email hosting with KJM >>>>> Solutions >>>>> http://www.kjmsolutions.com >>>>> >>>>> >>>>> >>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>> Imports System >>>>>> Imports System.Management >>>>>> Imports System.Windows.Forms >>>>>> >>>>>> Namespace VIKINGSSUCK >>>>>> >>>>>> Public Class THEPACKERSROCK >>>>>> >>>>>> Function HELPMENOW() >>>>>> >>>>>> Dim searcher As New ManagementObjectSearcher( _ >>>>>> "root\MicrosoftExchangeV2", _ >>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>> >>>>>> For Each queryObj As ManagementObject in >>>>>> searcher.Get() >>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>> queryObj("MailboxDisplayName")) >>>>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>>>> Console.WriteLine("TotalItems: {0}", >>>>>> queryObj("TotalItems")) >>>>>> Next >>>>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>>>> >>>>>> End Function >>>>>> End Class >>>>>> End Namespace >>>>>> >>>>>> -- >>>>>> Get a powerful web, database, application, and email hosting with KJM >>>>>> Solutions >>>>>> http://www.kjmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>> This looks awfully close to what I need. I will be anxious to see >>>>>>> Kelly's response as well, but this looks real good. >>>>>>> >>>>>>> Thanx! >>>>>>> >>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>> Perhaps this will help: >>>>>>>> >>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Nothing to do with Active Directory.
Sounds like you need to install WMI though with System. Management on there you may hae already. Do you have teh WMI SDK on your computer? -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... > Yes, I did add a reference to System.Management, but I'm still getting the > error. Is it a permissions error that I can't do a query like that > against the Active Directory? Or is Active Directory not even in this > picture? > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >> let me know if you did what the screenshot in your email showed. >> >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>> Already did that. Would posting a copy of my code help? >>> ----------------------------------------------------------------------- >>> Dim search As New >>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>> "SELECT * FROM Exchange_Mailbox WHERE >>> MailboxDisplayName = 'AR'") >>> >>> Try >>> For Each objFound As ManagementObject In search.Get >>> txtStatus.AppendText("MailboxDisplayName: " & >>> objFound("MailboxDisplayName") & vbTab & _ >>> "Size : " & >>> objFound("Size") & vbTab & _ >>> "Total Items : " & >>> objFound("TotalItems") & vbNewLine) >>> Next >>> txtStatus.AppendText(vbNewLine & "Done.") >>> Catch ex As Exception >>> MsgBox("Error: " & ex.Message.ToString & " in " & >>> ex.Source.ToString) >>> End Try >>> ----------------------------------------------------------------------- >>> I really do appreciate your help! >>> >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>> Add a reference to system.management >>>> >>>> Kelly >>>> >>>> P.S. dropped an email in your box you have listed for email >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>> I'm getting "Invalid Namespace" from the System.Management namespace. >>>>> What am I not doing right? >>>>> >>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>> replace below with >>>>>> >>>>>> MsgBox(queryObj("Size")) >>>>>> >>>>>> MsgBox(queryObj("TotalItems")) >>>>>> >>>>>> >>>>>> replace this. I am sorry doing it on the fly. >>>>>> >>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>> queryObj("MailboxDisplayName")) >>>>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>>>> Console.WriteLine("TotalItems: {0}", >>>>>> queryObj("TotalItems")) >>>>>> >>>>>> >>>>>> -- >>>>>> Get a powerful web, database, application, and email hosting with KJM >>>>>> Solutions >>>>>> http://www.kjmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>> Imports System >>>>>>> Imports System.Management >>>>>>> Imports System.Windows.Forms >>>>>>> >>>>>>> Namespace VIKINGSSUCK >>>>>>> >>>>>>> Public Class THEPACKERSROCK >>>>>>> >>>>>>> Function HELPMENOW() >>>>>>> >>>>>>> Dim searcher As New ManagementObjectSearcher( _ >>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>> >>>>>>> For Each queryObj As ManagementObject in >>>>>>> searcher.Get() >>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>> queryObj("MailboxDisplayName")) >>>>>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>> queryObj("TotalItems")) >>>>>>> Next >>>>>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>>>>> >>>>>>> End Function >>>>>>> End Class >>>>>>> End Namespace >>>>>>> >>>>>>> -- >>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>> KJM Solutions >>>>>>> http://www.kjmsolutions.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>> This looks awfully close to what I need. I will be anxious to see >>>>>>>> Kelly's response as well, but this looks real good. >>>>>>>> >>>>>>>> Thanx! >>>>>>>> >>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>> Perhaps this will help: >>>>>>>>> >>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > If I install the WMI SDK, would I have to install it on whatever box runs
this program? 'Cause this will eventually run on a server box. Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... > Nothing to do with Active Directory. > > Sounds like you need to install WMI though with System. Management on > there you may hae already. > > Do you have teh WMI SDK on your computer? > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >> Yes, I did add a reference to System.Management, but I'm still getting >> the error. Is it a permissions error that I can't do a query like that >> against the Active Directory? Or is Active Directory not even in this >> picture? >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>> let me know if you did what the screenshot in your email showed. >>> >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>> Already did that. Would posting a copy of my code help? >>>> ----------------------------------------------------------------------- >>>> Dim search As New >>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>> "SELECT * FROM Exchange_Mailbox WHERE >>>> MailboxDisplayName = 'AR'") >>>> >>>> Try >>>> For Each objFound As ManagementObject In search.Get >>>> txtStatus.AppendText("MailboxDisplayName: " & >>>> objFound("MailboxDisplayName") & vbTab & _ >>>> "Size : " & >>>> objFound("Size") & vbTab & _ >>>> "Total Items : " & >>>> objFound("TotalItems") & vbNewLine) >>>> Next >>>> txtStatus.AppendText(vbNewLine & "Done.") >>>> Catch ex As Exception >>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>> ex.Source.ToString) >>>> End Try >>>> ----------------------------------------------------------------------- >>>> I really do appreciate your help! >>>> >>>> >>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>> Add a reference to system.management >>>>> >>>>> Kelly >>>>> >>>>> P.S. dropped an email in your box you have listed for email >>>>> >>>>> -- >>>>> Get a powerful web, database, application, and email hosting with KJM >>>>> Solutions >>>>> http://www.kjmsolutions.com >>>>> >>>>> >>>>> >>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>> I'm getting "Invalid Namespace" from the System.Management namespace. >>>>>> What am I not doing right? >>>>>> >>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>> replace below with >>>>>>> >>>>>>> MsgBox(queryObj("Size")) >>>>>>> >>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>> >>>>>>> >>>>>>> replace this. I am sorry doing it on the fly. >>>>>>> >>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>> queryObj("MailboxDisplayName")) >>>>>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>> queryObj("TotalItems")) >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>> KJM Solutions >>>>>>> http://www.kjmsolutions.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>> Imports System >>>>>>>> Imports System.Management >>>>>>>> Imports System.Windows.Forms >>>>>>>> >>>>>>>> Namespace VIKINGSSUCK >>>>>>>> >>>>>>>> Public Class THEPACKERSROCK >>>>>>>> >>>>>>>> Function HELPMENOW() >>>>>>>> >>>>>>>> Dim searcher As New ManagementObjectSearcher( _ >>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>> >>>>>>>> For Each queryObj As ManagementObject in >>>>>>>> searcher.Get() >>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>> queryObj("TotalItems")) >>>>>>>> Next >>>>>>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>>>>>> >>>>>>>> End Function >>>>>>>> End Class >>>>>>>> End Namespace >>>>>>>> >>>>>>>> -- >>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>> KJM Solutions >>>>>>>> http://www.kjmsolutions.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>> This looks awfully close to what I need. I will be anxious to see >>>>>>>>> Kelly's response as well, but this looks real good. >>>>>>>>> >>>>>>>>> Thanx! >>>>>>>>> >>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>> Perhaps this will help: >>>>>>>>>> >>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > No.
-- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... > If I install the WMI SDK, would I have to install it on whatever box runs > this program? 'Cause this will eventually run on a server box. > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >> Nothing to do with Active Directory. >> >> Sounds like you need to install WMI though with System. Management on >> there you may hae already. >> >> Do you have teh WMI SDK on your computer? >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>> Yes, I did add a reference to System.Management, but I'm still getting >>> the error. Is it a permissions error that I can't do a query like that >>> against the Active Directory? Or is Active Directory not even in this >>> picture? >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>> let me know if you did what the screenshot in your email showed. >>>> >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>> Already did that. Would posting a copy of my code help? >>>>> ----------------------------------------------------------------------- >>>>> Dim search As New >>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>> MailboxDisplayName = 'AR'") >>>>> >>>>> Try >>>>> For Each objFound As ManagementObject In search.Get >>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>> "Size : " & >>>>> objFound("Size") & vbTab & _ >>>>> "Total Items : " & >>>>> objFound("TotalItems") & vbNewLine) >>>>> Next >>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>> Catch ex As Exception >>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>> ex.Source.ToString) >>>>> End Try >>>>> ----------------------------------------------------------------------- >>>>> I really do appreciate your help! >>>>> >>>>> >>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>> Add a reference to system.management >>>>>> >>>>>> Kelly >>>>>> >>>>>> P.S. dropped an email in your box you have listed for email >>>>>> >>>>>> -- >>>>>> Get a powerful web, database, application, and email hosting with KJM >>>>>> Solutions >>>>>> http://www.kjmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>> namespace. What am I not doing right? >>>>>>> >>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>> replace below with >>>>>>>> >>>>>>>> MsgBox(queryObj("Size")) >>>>>>>> >>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>> >>>>>>>> >>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>> >>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>> Console.WriteLine("Size: {0}", queryObj("Size")) >>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>> queryObj("TotalItems")) >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>> KJM Solutions >>>>>>>> http://www.kjmsolutions.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>> Imports System >>>>>>>>> Imports System.Management >>>>>>>>> Imports System.Windows.Forms >>>>>>>>> >>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>> >>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>> >>>>>>>>> Function HELPMENOW() >>>>>>>>> >>>>>>>>> Dim searcher As New ManagementObjectSearcher( _ >>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>> >>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>> searcher.Get() >>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>> queryObj("Size")) >>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>> queryObj("TotalItems")) >>>>>>>>> Next >>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>>>>>>> >>>>>>>>> End Function >>>>>>>>> End Class >>>>>>>>> End Namespace >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>> KJM Solutions >>>>>>>>> http://www.kjmsolutions.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>> This looks awfully close to what I need. I will be anxious to >>>>>>>>>> see Kelly's response as well, but this looks real good. >>>>>>>>>> >>>>>>>>>> Thanx! >>>>>>>>>> >>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>> Perhaps this will help: >>>>>>>>>>> >>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Where would I download the WMI SDK, then? I Googled it and all I came up
with was links to an SDK that works for VC++ & VB6. Surely there's gotta be an update since then. Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... > No. > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >> If I install the WMI SDK, would I have to install it on whatever box runs >> this program? 'Cause this will eventually run on a server box. >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>> Nothing to do with Active Directory. >>> >>> Sounds like you need to install WMI though with System. Management on >>> there you may hae already. >>> >>> Do you have teh WMI SDK on your computer? >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>> Yes, I did add a reference to System.Management, but I'm still getting >>>> the error. Is it a permissions error that I can't do a query like that >>>> against the Active Directory? Or is Active Directory not even in this >>>> picture? >>>> >>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>> let me know if you did what the screenshot in your email showed. >>>>> >>>>> >>>>> -- >>>>> Get a powerful web, database, application, and email hosting with KJM >>>>> Solutions >>>>> http://www.kjmsolutions.com >>>>> >>>>> >>>>> >>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>> Already did that. Would posting a copy of my code help? >>>>>> ----------------------------------------------------------------------- >>>>>> Dim search As New >>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>> MailboxDisplayName = 'AR'") >>>>>> >>>>>> Try >>>>>> For Each objFound As ManagementObject In search.Get >>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>> "Size : " & >>>>>> objFound("Size") & vbTab & _ >>>>>> "Total Items : " & >>>>>> objFound("TotalItems") & vbNewLine) >>>>>> Next >>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>> Catch ex As Exception >>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>> ex.Source.ToString) >>>>>> End Try >>>>>> ----------------------------------------------------------------------- >>>>>> I really do appreciate your help! >>>>>> >>>>>> >>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>> Add a reference to system.management >>>>>>> >>>>>>> Kelly >>>>>>> >>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>> >>>>>>> -- >>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>> KJM Solutions >>>>>>> http://www.kjmsolutions.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>> namespace. What am I not doing right? >>>>>>>> >>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>> replace below with >>>>>>>>> >>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>> >>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>> >>>>>>>>> >>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>> >>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>> queryObj("Size")) >>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>> queryObj("TotalItems")) >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>> KJM Solutions >>>>>>>>> http://www.kjmsolutions.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>> Imports System >>>>>>>>>> Imports System.Management >>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>> >>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>> >>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>> >>>>>>>>>> Function HELPMENOW() >>>>>>>>>> >>>>>>>>>> Dim searcher As New >>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>> >>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>> searcher.Get() >>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>> queryObj("Size")) >>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>> Next >>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>>>>>>>> >>>>>>>>>> End Function >>>>>>>>>> End Class >>>>>>>>>> End Namespace >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>>> KJM Solutions >>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>> This looks awfully close to what I need. I will be anxious to >>>>>>>>>>> see Kelly's response as well, but this looks real good. >>>>>>>>>>> >>>>>>>>>>> Thanx! >>>>>>>>>>> >>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>> >>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Ok, I'm back to this. I tried one of the queries on this link:
http://www.wilsonmar.com/1wmiwbem.htm and am having limited success with it, so I would guess that that means that I have the basics installed for using WMI. So does the fact that I don't have administrator authority on the network explain why I can't query the mail server? Show quoteHide quote "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... > Where would I download the WMI SDK, then? I Googled it and all I came up > with was links to an SDK that works for VC++ & VB6. Surely there's gotta > be an update since then. > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >> No. >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>> If I install the WMI SDK, would I have to install it on whatever box >>> runs this program? 'Cause this will eventually run on a server box. >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>> Nothing to do with Active Directory. >>>> >>>> Sounds like you need to install WMI though with System. Management on >>>> there you may hae already. >>>> >>>> Do you have teh WMI SDK on your computer? >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>> Yes, I did add a reference to System.Management, but I'm still getting >>>>> the error. Is it a permissions error that I can't do a query like >>>>> that against the Active Directory? Or is Active Directory not even in >>>>> this picture? >>>>> >>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>> let me know if you did what the screenshot in your email showed. >>>>>> >>>>>> >>>>>> -- >>>>>> Get a powerful web, database, application, and email hosting with KJM >>>>>> Solutions >>>>>> http://www.kjmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>> Already did that. Would posting a copy of my code help? >>>>>>> ----------------------------------------------------------------------- >>>>>>> Dim search As New >>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>> MailboxDisplayName = 'AR'") >>>>>>> >>>>>>> Try >>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>> "Size : " & >>>>>>> objFound("Size") & vbTab & _ >>>>>>> "Total Items : " & >>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>> Next >>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>> Catch ex As Exception >>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>> ex.Source.ToString) >>>>>>> End Try >>>>>>> ----------------------------------------------------------------------- >>>>>>> I really do appreciate your help! >>>>>>> >>>>>>> >>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>> Add a reference to system.management >>>>>>>> >>>>>>>> Kelly >>>>>>>> >>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>> >>>>>>>> -- >>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>> KJM Solutions >>>>>>>> http://www.kjmsolutions.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>> namespace. What am I not doing right? >>>>>>>>> >>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>> replace below with >>>>>>>>>> >>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>> >>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>> >>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>> queryObj("Size")) >>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>>> KJM Solutions >>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>> Imports System >>>>>>>>>>> Imports System.Management >>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>> >>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>> >>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>> >>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>> >>>>>>>>>>> Dim searcher As New >>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>> >>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>> searcher.Get() >>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>> queryObj("Size")) >>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>> Next >>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>>>>>>>>> >>>>>>>>>>> End Function >>>>>>>>>>> End Class >>>>>>>>>>> End Namespace >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>> with KJM Solutions >>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>> This looks awfully close to what I need. I will be anxious to >>>>>>>>>>>> see Kelly's response as well, but this looks real good. >>>>>>>>>>>> >>>>>>>>>>>> Thanx! >>>>>>>>>>>> >>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>> >>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Email me off list. I need to set up a remote desktop session with you. There
is no reason it should not be working. Kelly -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... > Ok, I'm back to this. I tried one of the queries on this link: > http://www.wilsonmar.com/1wmiwbem.htm and am having limited success with > it, so I would guess that that means that I have the basics installed for > using WMI. So does the fact that I don't have administrator authority on > the network explain why I can't query the mail server? > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >> Where would I download the WMI SDK, then? I Googled it and all I came up >> with was links to an SDK that works for VC++ & VB6. Surely there's gotta >> be an update since then. >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>> No. >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>> If I install the WMI SDK, would I have to install it on whatever box >>>> runs this program? 'Cause this will eventually run on a server box. >>>> >>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>> Nothing to do with Active Directory. >>>>> >>>>> Sounds like you need to install WMI though with System. Management on >>>>> there you may hae already. >>>>> >>>>> Do you have teh WMI SDK on your computer? >>>>> >>>>> -- >>>>> Get a powerful web, database, application, and email hosting with KJM >>>>> Solutions >>>>> http://www.kjmsolutions.com >>>>> >>>>> >>>>> >>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>> getting the error. Is it a permissions error that I can't do a query >>>>>> like that against the Active Directory? Or is Active Directory not >>>>>> even in this picture? >>>>>> >>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>> let me know if you did what the screenshot in your email showed. >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>> KJM Solutions >>>>>>> http://www.kjmsolutions.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>> ----------------------------------------------------------------------- >>>>>>>> Dim search As New >>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>> >>>>>>>> Try >>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>> "Size : " & >>>>>>>> objFound("Size") & vbTab & _ >>>>>>>> "Total Items : " & >>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>> Next >>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>> Catch ex As Exception >>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>> ex.Source.ToString) >>>>>>>> End Try >>>>>>>> ----------------------------------------------------------------------- >>>>>>>> I really do appreciate your help! >>>>>>>> >>>>>>>> >>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>> Add a reference to system.management >>>>>>>>> >>>>>>>>> Kelly >>>>>>>>> >>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>> KJM Solutions >>>>>>>>> http://www.kjmsolutions.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>> >>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>> replace below with >>>>>>>>>>> >>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>> >>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>> >>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>> queryObj("Size")) >>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>> with KJM Solutions >>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>> Imports System >>>>>>>>>>>> Imports System.Management >>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>> >>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>> >>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>> >>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>> >>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>> >>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>> searcher.Get() >>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>> Next >>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody here. >>>>>>>>>>>> >>>>>>>>>>>> End Function >>>>>>>>>>>> End Class >>>>>>>>>>>> End Namespace >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>> This looks awfully close to what I need. I will be anxious to >>>>>>>>>>>>> see Kelly's response as well, but this looks real good. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanx! >>>>>>>>>>>>> >>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>> >>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > With all due respect, I'd prefer not to do that--I don't think my network
admin or my boss would think kindly of it. I tried to bring up the WMI under Computer Management and all I see is a window with the "i" balloon and the message: "Configures and Controls the Windows Management Instrumentation (WMI) service." Does this information help any? Is there anything else that I can check to see why I'm not able to do this? Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... > Email me off list. I need to set up a remote desktop session with you. > There is no reason it should not be working. > > Kelly > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >> Ok, I'm back to this. I tried one of the queries on this link: >> http://www.wilsonmar.com/1wmiwbem.htm and am having limited success with >> it, so I would guess that that means that I have the basics installed for >> using WMI. So does the fact that I don't have administrator authority on >> the network explain why I can't query the mail server? >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>> Where would I download the WMI SDK, then? I Googled it and all I came >>> up with was links to an SDK that works for VC++ & VB6. Surely there's >>> gotta be an update since then. >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>> No. >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>> If I install the WMI SDK, would I have to install it on whatever box >>>>> runs this program? 'Cause this will eventually run on a server box. >>>>> >>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>> Nothing to do with Active Directory. >>>>>> >>>>>> Sounds like you need to install WMI though with System. Management on >>>>>> there you may hae already. >>>>>> >>>>>> Do you have teh WMI SDK on your computer? >>>>>> >>>>>> -- >>>>>> Get a powerful web, database, application, and email hosting with KJM >>>>>> Solutions >>>>>> http://www.kjmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>>> getting the error. Is it a permissions error that I can't do a >>>>>>> query like that against the Active Directory? Or is Active Directory >>>>>>> not even in this picture? >>>>>>> >>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>> let me know if you did what the screenshot in your email showed. >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>> KJM Solutions >>>>>>>> http://www.kjmsolutions.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>> Dim search As New >>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>>> >>>>>>>>> Try >>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>> "Size : " & >>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>> "Total Items : " & >>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>> Next >>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>> Catch ex As Exception >>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>> ex.Source.ToString) >>>>>>>>> End Try >>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>> I really do appreciate your help! >>>>>>>>> >>>>>>>>> >>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>> Add a reference to system.management >>>>>>>>>> >>>>>>>>>> Kelly >>>>>>>>>> >>>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>>> KJM Solutions >>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>>> >>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>> replace below with >>>>>>>>>>>> >>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>> >>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>> >>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>> Imports System >>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>> >>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>> >>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>> >>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>> >>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>> >>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: >>>>>>>>>>>>> {0}", queryObj("MailboxDisplayName")) >>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>> Next >>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody >>>>>>>>>>>>> here. >>>>>>>>>>>>> >>>>>>>>>>>>> End Function >>>>>>>>>>>>> End Class >>>>>>>>>>>>> End Namespace >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>> This looks awfully close to what I need. I will be anxious >>>>>>>>>>>>>> to see Kelly's response as well, but this looks real good. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>> >>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > wmi is included with every desktop everywhere except Win9x crap right?
"Bryan Dickerson" <txprp***@netscape.net> wrote in message the more I read of this thread I gotta wonder what you're up to over there news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... > With all due respect, I'd prefer not to do that--I don't think my network > admin or my boss would think kindly of it. ;) Show quoteHide quote > I tried to bring up the WMI under Computer Management and all I see is a > window with the "i" balloon and the message: "Configures and Controls the > Windows Management Instrumentation (WMI) service." Does this information > help any? Is there anything else that I can check to see why I'm not able > to do this? I apologize. Normally I am better at answering questions than this. Just
have had some road blocks. -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Liz" <liz@no-spam.org> wrote in message news:g648g.368812$BL7.181785@fe09.news.easynews.com... > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... > >> With all due respect, I'd prefer not to do that--I don't think my network >> admin or my boss would think kindly of it. > > the more I read of this thread I gotta wonder what you're up to over there > ;) > > > >> I tried to bring up the WMI under Computer Management and all I see is a >> window with the "i" balloon and the message: "Configures and Controls the >> Windows Management Instrumentation (WMI) service." Does this information >> help any? Is there anything else that I can check to see why I'm not >> able to do this? > > I'm trying to write an email monitor for an internal email address that we
seem to be having problems with. So I'm just trying to do a simple read of items in an inbox and report back if there are any unread items older than X minutes. Kelly suggested using WMI and I am trying to get it to work, but I'm getting an "Invalid Namespace" error when I try to run the code in his reply. I think (or thought) it should be pretty simple stuff, but maybe I thought wrong. Show quoteHide quote "Liz" <liz@no-spam.org> wrote in message news:g648g.368812$BL7.181785@fe09.news.easynews.com... > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... > >> With all due respect, I'd prefer not to do that--I don't think my network >> admin or my boss would think kindly of it. > > the more I read of this thread I gotta wonder what you're up to over there > ;) > > > >> I tried to bring up the WMI under Computer Management and all I see is a >> window with the "i" balloon and the message: "Configures and Controls the >> Windows Management Instrumentation (WMI) service." Does this information >> help any? Is there anything else that I can check to see why I'm not >> able to do this? > > Are you running Windows 2000? Or what is your platform?
-- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... > With all due respect, I'd prefer not to do that--I don't think my network > admin or my boss would think kindly of it. > > I tried to bring up the WMI under Computer Management and all I see is a > window with the "i" balloon and the message: "Configures and Controls the > Windows Management Instrumentation (WMI) service." Does this information > help any? Is there anything else that I can check to see why I'm not able > to do this? > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... >> Email me off list. I need to set up a remote desktop session with you. >> There is no reason it should not be working. >> >> Kelly >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >>> Ok, I'm back to this. I tried one of the queries on this link: >>> http://www.wilsonmar.com/1wmiwbem.htm and am having limited success with >>> it, so I would guess that that means that I have the basics installed >>> for using WMI. So does the fact that I don't have administrator >>> authority on the network explain why I can't query the mail server? >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>>> Where would I download the WMI SDK, then? I Googled it and all I came >>>> up with was links to an SDK that works for VC++ & VB6. Surely there's >>>> gotta be an update since then. >>>> >>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>>> No. >>>>> >>>>> -- >>>>> Get a powerful web, database, application, and email hosting with KJM >>>>> Solutions >>>>> http://www.kjmsolutions.com >>>>> >>>>> >>>>> >>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>>> If I install the WMI SDK, would I have to install it on whatever box >>>>>> runs this program? 'Cause this will eventually run on a server box. >>>>>> >>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>>> Nothing to do with Active Directory. >>>>>>> >>>>>>> Sounds like you need to install WMI though with System. Management >>>>>>> on there you may hae already. >>>>>>> >>>>>>> Do you have teh WMI SDK on your computer? >>>>>>> >>>>>>> -- >>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>> KJM Solutions >>>>>>> http://www.kjmsolutions.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>>>> getting the error. Is it a permissions error that I can't do a >>>>>>>> query like that against the Active Directory? Or is Active >>>>>>>> Directory not even in this picture? >>>>>>>> >>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>>> let me know if you did what the screenshot in your email showed. >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>> KJM Solutions >>>>>>>>> http://www.kjmsolutions.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>> Dim search As New >>>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>>>> >>>>>>>>>> Try >>>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>>> "Size : " & >>>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>>> "Total Items : " & >>>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>>> Next >>>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>>> Catch ex As Exception >>>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>>> ex.Source.ToString) >>>>>>>>>> End Try >>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>> I really do appreciate your help! >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>> Add a reference to system.management >>>>>>>>>>> >>>>>>>>>>> Kelly >>>>>>>>>>> >>>>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>> with KJM Solutions >>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>>>> >>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>> replace below with >>>>>>>>>>>>> >>>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>>> >>>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>>> >>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>> Imports System >>>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>>> >>>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>>> >>>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>>> >>>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>>> >>>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>>> >>>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: >>>>>>>>>>>>>> {0}", queryObj("MailboxDisplayName")) >>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>> Next >>>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody >>>>>>>>>>>>>> here. >>>>>>>>>>>>>> >>>>>>>>>>>>>> End Function >>>>>>>>>>>>>> End Class >>>>>>>>>>>>>> End Namespace >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>> This looks awfully close to what I need. I will be anxious >>>>>>>>>>>>>>> to see Kelly's response as well, but this looks real good. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Please go to services on the machine and verify "Windows Management
Instrumentation" is in fact running. -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... > With all due respect, I'd prefer not to do that--I don't think my network > admin or my boss would think kindly of it. > > I tried to bring up the WMI under Computer Management and all I see is a > window with the "i" balloon and the message: "Configures and Controls the > Windows Management Instrumentation (WMI) service." Does this information > help any? Is there anything else that I can check to see why I'm not able > to do this? > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... >> Email me off list. I need to set up a remote desktop session with you. >> There is no reason it should not be working. >> >> Kelly >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >>> Ok, I'm back to this. I tried one of the queries on this link: >>> http://www.wilsonmar.com/1wmiwbem.htm and am having limited success with >>> it, so I would guess that that means that I have the basics installed >>> for using WMI. So does the fact that I don't have administrator >>> authority on the network explain why I can't query the mail server? >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>>> Where would I download the WMI SDK, then? I Googled it and all I came >>>> up with was links to an SDK that works for VC++ & VB6. Surely there's >>>> gotta be an update since then. >>>> >>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>>> No. >>>>> >>>>> -- >>>>> Get a powerful web, database, application, and email hosting with KJM >>>>> Solutions >>>>> http://www.kjmsolutions.com >>>>> >>>>> >>>>> >>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>>> If I install the WMI SDK, would I have to install it on whatever box >>>>>> runs this program? 'Cause this will eventually run on a server box. >>>>>> >>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>>> Nothing to do with Active Directory. >>>>>>> >>>>>>> Sounds like you need to install WMI though with System. Management >>>>>>> on there you may hae already. >>>>>>> >>>>>>> Do you have teh WMI SDK on your computer? >>>>>>> >>>>>>> -- >>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>> KJM Solutions >>>>>>> http://www.kjmsolutions.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>>>> getting the error. Is it a permissions error that I can't do a >>>>>>>> query like that against the Active Directory? Or is Active >>>>>>>> Directory not even in this picture? >>>>>>>> >>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>>> let me know if you did what the screenshot in your email showed. >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>> KJM Solutions >>>>>>>>> http://www.kjmsolutions.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>> Dim search As New >>>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>>>> >>>>>>>>>> Try >>>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>>> "Size : " & >>>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>>> "Total Items : " & >>>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>>> Next >>>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>>> Catch ex As Exception >>>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>>> ex.Source.ToString) >>>>>>>>>> End Try >>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>> I really do appreciate your help! >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>> Add a reference to system.management >>>>>>>>>>> >>>>>>>>>>> Kelly >>>>>>>>>>> >>>>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>> with KJM Solutions >>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>>>> >>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>> replace below with >>>>>>>>>>>>> >>>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>>> >>>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>>> >>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>> Imports System >>>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>>> >>>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>>> >>>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>>> >>>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>>> >>>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>>> >>>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: >>>>>>>>>>>>>> {0}", queryObj("MailboxDisplayName")) >>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>> Next >>>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody >>>>>>>>>>>>>> here. >>>>>>>>>>>>>> >>>>>>>>>>>>>> End Function >>>>>>>>>>>>>> End Class >>>>>>>>>>>>>> End Namespace >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>> This looks awfully close to what I need. I will be anxious >>>>>>>>>>>>>>> to see Kelly's response as well, but this looks real good. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > I'm running Windows XP Pro (with all the service packs and updates
installed) and I verified that the Windows Management Instrumentation service is indeed running. There is a Windows Management Instrumentation Driver Extensions that is not currently running and is listed as Manual. Should that be running as well? Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:uQM3v54cGHA.4224@TK2MSFTNGP04.phx.gbl... > Please go to services on the machine and verify "Windows Management > Instrumentation" is in fact running. > > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... >> With all due respect, I'd prefer not to do that--I don't think my network >> admin or my boss would think kindly of it. >> >> I tried to bring up the WMI under Computer Management and all I see is a >> window with the "i" balloon and the message: "Configures and Controls the >> Windows Management Instrumentation (WMI) service." Does this information >> help any? Is there anything else that I can check to see why I'm not >> able to do this? >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... >>> Email me off list. I need to set up a remote desktop session with you. >>> There is no reason it should not be working. >>> >>> Kelly >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >>>> Ok, I'm back to this. I tried one of the queries on this link: >>>> http://www.wilsonmar.com/1wmiwbem.htm and am having limited success >>>> with it, so I would guess that that means that I have the basics >>>> installed for using WMI. So does the fact that I don't have >>>> administrator authority on the network explain why I can't query the >>>> mail server? >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>>>> Where would I download the WMI SDK, then? I Googled it and all I came >>>>> up with was links to an SDK that works for VC++ & VB6. Surely there's >>>>> gotta be an update since then. >>>>> >>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>>>> No. >>>>>> >>>>>> -- >>>>>> Get a powerful web, database, application, and email hosting with KJM >>>>>> Solutions >>>>>> http://www.kjmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>>>> If I install the WMI SDK, would I have to install it on whatever box >>>>>>> runs this program? 'Cause this will eventually run on a server box. >>>>>>> >>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>>>> Nothing to do with Active Directory. >>>>>>>> >>>>>>>> Sounds like you need to install WMI though with System. Management >>>>>>>> on there you may hae already. >>>>>>>> >>>>>>>> Do you have teh WMI SDK on your computer? >>>>>>>> >>>>>>>> -- >>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>> KJM Solutions >>>>>>>> http://www.kjmsolutions.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>>>>> getting the error. Is it a permissions error that I can't do a >>>>>>>>> query like that against the Active Directory? Or is Active >>>>>>>>> Directory not even in this picture? >>>>>>>>> >>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>>>> let me know if you did what the screenshot in your email showed. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>>> KJM Solutions >>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>> Dim search As New >>>>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>>>>> >>>>>>>>>>> Try >>>>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>>>> "Size : " & >>>>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>>>> "Total Items : " & >>>>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>>>> Next >>>>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>>>> Catch ex As Exception >>>>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>>>> ex.Source.ToString) >>>>>>>>>>> End Try >>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>> I really do appreciate your help! >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>> Add a reference to system.management >>>>>>>>>>>> >>>>>>>>>>>> Kelly >>>>>>>>>>>> >>>>>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>>>>> >>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>> replace below with >>>>>>>>>>>>>> >>>>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>>>> >>>>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>> Imports System >>>>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: >>>>>>>>>>>>>>> {0}", queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>> Next >>>>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody >>>>>>>>>>>>>>> here. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> End Function >>>>>>>>>>>>>>> End Class >>>>>>>>>>>>>>> End Namespace >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>> This looks awfully close to what I need. I will be anxious >>>>>>>>>>>>>>>> to see Kelly's response as well, but this looks real good. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > See if this helps....
if not....my only option left to help you is hands on so talk to your admin or boss or whatever you need to. http://www.microsoft.com/technet/prodtechnol/sms/sms2003/opsguide/ops_2fc2.mspx?mfr=true -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:OtGKwb5cGHA.4072@TK2MSFTNGP05.phx.gbl... > I'm running Windows XP Pro (with all the service packs and updates > installed) and I verified that the Windows Management Instrumentation > service is indeed running. There is a Windows Management Instrumentation > Driver Extensions that is not currently running and is listed as Manual. > Should that be running as well? > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:uQM3v54cGHA.4224@TK2MSFTNGP04.phx.gbl... >> Please go to services on the machine and verify "Windows Management >> Instrumentation" is in fact running. >> >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... >>> With all due respect, I'd prefer not to do that--I don't think my >>> network admin or my boss would think kindly of it. >>> >>> I tried to bring up the WMI under Computer Management and all I see is a >>> window with the "i" balloon and the message: "Configures and Controls >>> the Windows Management Instrumentation (WMI) service." Does this >>> information help any? Is there anything else that I can check to see >>> why I'm not able to do this? >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... >>>> Email me off list. I need to set up a remote desktop session with you. >>>> There is no reason it should not be working. >>>> >>>> Kelly >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >>>>> Ok, I'm back to this. I tried one of the queries on this link: >>>>> http://www.wilsonmar.com/1wmiwbem.htm and am having limited success >>>>> with it, so I would guess that that means that I have the basics >>>>> installed for using WMI. So does the fact that I don't have >>>>> administrator authority on the network explain why I can't query the >>>>> mail server? >>>>> >>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>>>>> Where would I download the WMI SDK, then? I Googled it and all I >>>>>> came up with was links to an SDK that works for VC++ & VB6. Surely >>>>>> there's gotta be an update since then. >>>>>> >>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>>>>> No. >>>>>>> >>>>>>> -- >>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>> KJM Solutions >>>>>>> http://www.kjmsolutions.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>>>>> If I install the WMI SDK, would I have to install it on whatever >>>>>>>> box runs this program? 'Cause this will eventually run on a server >>>>>>>> box. >>>>>>>> >>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>>>>> Nothing to do with Active Directory. >>>>>>>>> >>>>>>>>> Sounds like you need to install WMI though with System. Management >>>>>>>>> on there you may hae already. >>>>>>>>> >>>>>>>>> Do you have teh WMI SDK on your computer? >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>> KJM Solutions >>>>>>>>> http://www.kjmsolutions.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>>>>>> getting the error. Is it a permissions error that I can't do a >>>>>>>>>> query like that against the Active Directory? Or is Active >>>>>>>>>> Directory not even in this picture? >>>>>>>>>> >>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>> let me know if you did what the screenshot in your email showed. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>> with KJM Solutions >>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>> Dim search As New >>>>>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>>>>>> >>>>>>>>>>>> Try >>>>>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>>>>> "Size : " & >>>>>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>>>>> "Total Items : " & >>>>>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>>>>> Next >>>>>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>>>>> Catch ex As Exception >>>>>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>>>>> ex.Source.ToString) >>>>>>>>>>>> End Try >>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>> I really do appreciate your help! >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>> Add a reference to system.management >>>>>>>>>>>>> >>>>>>>>>>>>> Kelly >>>>>>>>>>>>> >>>>>>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>>>>>> >>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>> replace below with >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>>> Imports System >>>>>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: >>>>>>>>>>>>>>>> {0}", queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>> Next >>>>>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody >>>>>>>>>>>>>>>> here. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> End Function >>>>>>>>>>>>>>>> End Class >>>>>>>>>>>>>>>> End Namespace >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>> This looks awfully close to what I need. I will be >>>>>>>>>>>>>>>>> anxious to see Kelly's response as well, but this looks >>>>>>>>>>>>>>>>> real good. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > If I look at the WMI Control Properties, on the Security tab at the
Namespace navigation tree, there is no "MicrosoftExchangeV2" under the root node. Does that tell you anything about what might be wrong? Is there something that I need to add? If so, how? Is there something that I need to be 'authorized' by my admin to see? Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:epkG6z5cGHA.5116@TK2MSFTNGP04.phx.gbl... > See if this helps.... > > if not....my only option left to help you is hands on so talk to your > admin or boss or whatever you need to. > > http://www.microsoft.com/technet/prodtechnol/sms/sms2003/opsguide/ops_2fc2.mspx?mfr=true > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:OtGKwb5cGHA.4072@TK2MSFTNGP05.phx.gbl... >> I'm running Windows XP Pro (with all the service packs and updates >> installed) and I verified that the Windows Management Instrumentation >> service is indeed running. There is a Windows Management Instrumentation >> Driver Extensions that is not currently running and is listed as Manual. >> Should that be running as well? >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:uQM3v54cGHA.4224@TK2MSFTNGP04.phx.gbl... >>> Please go to services on the machine and verify "Windows Management >>> Instrumentation" is in fact running. >>> >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... >>>> With all due respect, I'd prefer not to do that--I don't think my >>>> network admin or my boss would think kindly of it. >>>> >>>> I tried to bring up the WMI under Computer Management and all I see is >>>> a window with the "i" balloon and the message: "Configures and Controls >>>> the Windows Management Instrumentation (WMI) service." Does this >>>> information help any? Is there anything else that I can check to see >>>> why I'm not able to do this? >>>> >>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>> news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... >>>>> Email me off list. I need to set up a remote desktop session with you. >>>>> There is no reason it should not be working. >>>>> >>>>> Kelly >>>>> >>>>> -- >>>>> Get a powerful web, database, application, and email hosting with KJM >>>>> Solutions >>>>> http://www.kjmsolutions.com >>>>> >>>>> >>>>> >>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>> news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >>>>>> Ok, I'm back to this. I tried one of the queries on this link: >>>>>> http://www.wilsonmar.com/1wmiwbem.htm and am having limited success >>>>>> with it, so I would guess that that means that I have the basics >>>>>> installed for using WMI. So does the fact that I don't have >>>>>> administrator authority on the network explain why I can't query the >>>>>> mail server? >>>>>> >>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>>>>>> Where would I download the WMI SDK, then? I Googled it and all I >>>>>>> came up with was links to an SDK that works for VC++ & VB6. Surely >>>>>>> there's gotta be an update since then. >>>>>>> >>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>>>>>> No. >>>>>>>> >>>>>>>> -- >>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>> KJM Solutions >>>>>>>> http://www.kjmsolutions.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>>>>>> If I install the WMI SDK, would I have to install it on whatever >>>>>>>>> box runs this program? 'Cause this will eventually run on a server >>>>>>>>> box. >>>>>>>>> >>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>>>>>> Nothing to do with Active Directory. >>>>>>>>>> >>>>>>>>>> Sounds like you need to install WMI though with System. >>>>>>>>>> Management on there you may hae already. >>>>>>>>>> >>>>>>>>>> Do you have teh WMI SDK on your computer? >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>>> KJM Solutions >>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>>>>>>> getting the error. Is it a permissions error that I can't do a >>>>>>>>>>> query like that against the Active Directory? Or is Active >>>>>>>>>>> Directory not even in this picture? >>>>>>>>>>> >>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>> let me know if you did what the screenshot in your email >>>>>>>>>>>> showed. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>> Dim search As New >>>>>>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>>>>>>> >>>>>>>>>>>>> Try >>>>>>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>>>>>> "Size : " & >>>>>>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>>>>>> "Total Items : " & >>>>>>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>>>>>> Next >>>>>>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>>>>>> Catch ex As Exception >>>>>>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>>>>>> ex.Source.ToString) >>>>>>>>>>>>> End Try >>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>> I really do appreciate your help! >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>> Add a reference to system.management >>>>>>>>>>>>>> >>>>>>>>>>>>>> Kelly >>>>>>>>>>>>>> >>>>>>>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>> replace below with >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>>>> Imports System >>>>>>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: >>>>>>>>>>>>>>>>> {0}", queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>>> Next >>>>>>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody >>>>>>>>>>>>>>>>> here. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> End Function >>>>>>>>>>>>>>>>> End Class >>>>>>>>>>>>>>>>> End Namespace >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>>>>> news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>>> This looks awfully close to what I need. I will be >>>>>>>>>>>>>>>>>> anxious to see Kelly's response as well, but this looks >>>>>>>>>>>>>>>>>> real good. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > No you won't see MicrosoftExchangeV2 there.
You are connecting remotely to the exchange server I take it? There is no such animal on Windows XP. I will need to modify my code sample. I was under the impression you were running this local to the server. I will need to connect you remotely to the given server. However, your WMI issue will still need to be resolved. I strongly suggest while I am working on this issue of you connecting to teh exchange server remotely that you contact your admin or boss and obtain permission for me to come in and set up your WMI properly. I can't guess anymore what you are seeing and what your issues are. Regardless, I hope to have a remote example for you shortly. -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:OIuLFQ6cGHA.4976@TK2MSFTNGP04.phx.gbl... > If I look at the WMI Control Properties, on the Security tab at the > Namespace navigation tree, there is no "MicrosoftExchangeV2" under the > root node. Does that tell you anything about what might be wrong? Is > there something that I need to add? If so, how? Is there something that > I need to be 'authorized' by my admin to see? > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:epkG6z5cGHA.5116@TK2MSFTNGP04.phx.gbl... >> See if this helps.... >> >> if not....my only option left to help you is hands on so talk to your >> admin or boss or whatever you need to. >> >> http://www.microsoft.com/technet/prodtechnol/sms/sms2003/opsguide/ops_2fc2.mspx?mfr=true >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:OtGKwb5cGHA.4072@TK2MSFTNGP05.phx.gbl... >>> I'm running Windows XP Pro (with all the service packs and updates >>> installed) and I verified that the Windows Management Instrumentation >>> service is indeed running. There is a Windows Management >>> Instrumentation Driver Extensions that is not currently running and is >>> listed as Manual. Should that be running as well? >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:uQM3v54cGHA.4224@TK2MSFTNGP04.phx.gbl... >>>> Please go to services on the machine and verify "Windows Management >>>> Instrumentation" is in fact running. >>>> >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... >>>>> With all due respect, I'd prefer not to do that--I don't think my >>>>> network admin or my boss would think kindly of it. >>>>> >>>>> I tried to bring up the WMI under Computer Management and all I see is >>>>> a window with the "i" balloon and the message: "Configures and >>>>> Controls the Windows Management Instrumentation (WMI) service." Does >>>>> this information help any? Is there anything else that I can check to >>>>> see why I'm not able to do this? >>>>> >>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>> news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... >>>>>> Email me off list. I need to set up a remote desktop session with >>>>>> you. There is no reason it should not be working. >>>>>> >>>>>> Kelly >>>>>> >>>>>> -- >>>>>> Get a powerful web, database, application, and email hosting with KJM >>>>>> Solutions >>>>>> http://www.kjmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>> news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >>>>>>> Ok, I'm back to this. I tried one of the queries on this link: >>>>>>> http://www.wilsonmar.com/1wmiwbem.htm and am having limited success >>>>>>> with it, so I would guess that that means that I have the basics >>>>>>> installed for using WMI. So does the fact that I don't have >>>>>>> administrator authority on the network explain why I can't query the >>>>>>> mail server? >>>>>>> >>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>>>>>>> Where would I download the WMI SDK, then? I Googled it and all I >>>>>>>> came up with was links to an SDK that works for VC++ & VB6. Surely >>>>>>>> there's gotta be an update since then. >>>>>>>> >>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>>>>>>> No. >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>> KJM Solutions >>>>>>>>> http://www.kjmsolutions.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>>>>>>> If I install the WMI SDK, would I have to install it on whatever >>>>>>>>>> box runs this program? 'Cause this will eventually run on a >>>>>>>>>> server box. >>>>>>>>>> >>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>>>>>>> Nothing to do with Active Directory. >>>>>>>>>>> >>>>>>>>>>> Sounds like you need to install WMI though with System. >>>>>>>>>>> Management on there you may hae already. >>>>>>>>>>> >>>>>>>>>>> Do you have teh WMI SDK on your computer? >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>> with KJM Solutions >>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>>>>>>>> getting the error. Is it a permissions error that I can't do a >>>>>>>>>>>> query like that against the Active Directory? Or is Active >>>>>>>>>>>> Directory not even in this picture? >>>>>>>>>>>> >>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>> let me know if you did what the screenshot in your email >>>>>>>>>>>>> showed. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>>> Dim search As New >>>>>>>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>>>>>>>> >>>>>>>>>>>>>> Try >>>>>>>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>>>>>>> "Size : " & >>>>>>>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>>>>>>> "Total Items : " & >>>>>>>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>>>>>>> Next >>>>>>>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>>>>>>> Catch ex As Exception >>>>>>>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>>>>>>> ex.Source.ToString) >>>>>>>>>>>>>> End Try >>>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>>> I really do appreciate your help! >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>> Add a reference to system.management >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Kelly >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>> replace below with >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>>>>> Imports System >>>>>>>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: >>>>>>>>>>>>>>>>>> {0}", queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>>>> Next >>>>>>>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody >>>>>>>>>>>>>>>>>> here. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> End Function >>>>>>>>>>>>>>>>>> End Class >>>>>>>>>>>>>>>>>> End Namespace >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in >>>>>>>>>>>>>>>>>> message news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>>>> This looks awfully close to what I need. I will be >>>>>>>>>>>>>>>>>>> anxious to see Kelly's response as well, but this looks >>>>>>>>>>>>>>>>>>> real good. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Is there no documentation or instructions anywhere on how WMI needs to be
setup like you would do? Can you reply with those setup instructions? I'll be honest: I am more than thankful of the help that you have been so far, but I'm a bit put-off by your insistence at a remote session on my box. I can follow instructions fairly well, if you can either write them down or tell me where to look for them. Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:%23ZuOdr6cGHA.4932@TK2MSFTNGP03.phx.gbl... > No you won't see MicrosoftExchangeV2 there. > > You are connecting remotely to the exchange server I take it? There is no > such animal on Windows XP. > > I will need to modify my code sample. I was under the impression you were > running this local to the server. > > I will need to connect you remotely to the given server. However, your WMI > issue will still need to be resolved. > > I strongly suggest while I am working on this issue of you connecting to > teh exchange server remotely that you contact your admin or boss and > obtain permission for me to come in and set up your WMI properly. I can't > guess anymore what you are seeing and what your issues are. > > Regardless, I hope to have a remote example for you shortly. > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Bryan Dickerson" <txprp***@netscape.net> wrote in message > news:OIuLFQ6cGHA.4976@TK2MSFTNGP04.phx.gbl... >> If I look at the WMI Control Properties, on the Security tab at the >> Namespace navigation tree, there is no "MicrosoftExchangeV2" under the >> root node. Does that tell you anything about what might be wrong? Is >> there something that I need to add? If so, how? Is there something that >> I need to be 'authorized' by my admin to see? >> >> "vbnetdev" <vbnetdev@community.nospam> wrote in message >> news:epkG6z5cGHA.5116@TK2MSFTNGP04.phx.gbl... >>> See if this helps.... >>> >>> if not....my only option left to help you is hands on so talk to your >>> admin or boss or whatever you need to. >>> >>> http://www.microsoft.com/technet/prodtechnol/sms/sms2003/opsguide/ops_2fc2.mspx?mfr=true >>> >>> -- >>> Get a powerful web, database, application, and email hosting with KJM >>> Solutions >>> http://www.kjmsolutions.com >>> >>> >>> >>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>> news:OtGKwb5cGHA.4072@TK2MSFTNGP05.phx.gbl... >>>> I'm running Windows XP Pro (with all the service packs and updates >>>> installed) and I verified that the Windows Management Instrumentation >>>> service is indeed running. There is a Windows Management >>>> Instrumentation Driver Extensions that is not currently running and is >>>> listed as Manual. Should that be running as well? >>>> >>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>> news:uQM3v54cGHA.4224@TK2MSFTNGP04.phx.gbl... >>>>> Please go to services on the machine and verify "Windows Management >>>>> Instrumentation" is in fact running. >>>>> >>>>> >>>>> -- >>>>> Get a powerful web, database, application, and email hosting with KJM >>>>> Solutions >>>>> http://www.kjmsolutions.com >>>>> >>>>> >>>>> >>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>> news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... >>>>>> With all due respect, I'd prefer not to do that--I don't think my >>>>>> network admin or my boss would think kindly of it. >>>>>> >>>>>> I tried to bring up the WMI under Computer Management and all I see >>>>>> is a window with the "i" balloon and the message: "Configures and >>>>>> Controls the Windows Management Instrumentation (WMI) service." Does >>>>>> this information help any? Is there anything else that I can check >>>>>> to see why I'm not able to do this? >>>>>> >>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>> news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... >>>>>>> Email me off list. I need to set up a remote desktop session with >>>>>>> you. There is no reason it should not be working. >>>>>>> >>>>>>> Kelly >>>>>>> >>>>>>> -- >>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>> KJM Solutions >>>>>>> http://www.kjmsolutions.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>> news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >>>>>>>> Ok, I'm back to this. I tried one of the queries on this link: >>>>>>>> http://www.wilsonmar.com/1wmiwbem.htm and am having limited success >>>>>>>> with it, so I would guess that that means that I have the basics >>>>>>>> installed for using WMI. So does the fact that I don't have >>>>>>>> administrator authority on the network explain why I can't query >>>>>>>> the mail server? >>>>>>>> >>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>>>>>>>> Where would I download the WMI SDK, then? I Googled it and all I >>>>>>>>> came up with was links to an SDK that works for VC++ & VB6. >>>>>>>>> Surely there's gotta be an update since then. >>>>>>>>> >>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>>>>>>>> No. >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>>> KJM Solutions >>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>>>>>>>> If I install the WMI SDK, would I have to install it on whatever >>>>>>>>>>> box runs this program? 'Cause this will eventually run on a >>>>>>>>>>> server box. >>>>>>>>>>> >>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>>>>>>>> Nothing to do with Active Directory. >>>>>>>>>>>> >>>>>>>>>>>> Sounds like you need to install WMI though with System. >>>>>>>>>>>> Management on there you may hae already. >>>>>>>>>>>> >>>>>>>>>>>> Do you have teh WMI SDK on your computer? >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>>>>>>>>> getting the error. Is it a permissions error that I can't do >>>>>>>>>>>>> a query like that against the Active Directory? Or is Active >>>>>>>>>>>>> Directory not even in this picture? >>>>>>>>>>>>> >>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>> let me know if you did what the screenshot in your email >>>>>>>>>>>>>> showed. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>>>> Dim search As New >>>>>>>>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Try >>>>>>>>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>>>>>>>> "Size : " & >>>>>>>>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>>>>>>>> "Total Items : " & >>>>>>>>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>>>>>>>> Next >>>>>>>>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>>>>>>>> Catch ex As Exception >>>>>>>>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>>>>>>>> ex.Source.ToString) >>>>>>>>>>>>>>> End Try >>>>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>>>> I really do appreciate your help! >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>>> Add a reference to system.management >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Kelly >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>>> replace below with >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>>>>>> Imports System >>>>>>>>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>>>>> Next >>>>>>>>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to >>>>>>>>>>>>>>>>>>> somebody here. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> End Function >>>>>>>>>>>>>>>>>>> End Class >>>>>>>>>>>>>>>>>>> End Namespace >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in >>>>>>>>>>>>>>>>>>> message news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>>>>> This looks awfully close to what I need. I will be >>>>>>>>>>>>>>>>>>>> anxious to see Kelly's response as well, but this looks >>>>>>>>>>>>>>>>>>>> real good. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > If there were one size fits all set of instructions existed, guys in IT
would not be employed. There are many things that can impact the ability to communicate with a server to do what we are doing. Firewalls, routers, WMI permissions, Exchange communication protocols (plain text or Windows authentication), and the list goes on. I can't just throw things out there, have ESP so to say and know what the answer is on issues I can't see or be able to tell what your configuration is. I don't have anything nice to say to your remark about being put off so I am going to leave it alone. I don't think you would have found anyone else that would have stuck with you this long. -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:%23v3Qr06cGHA.1208@TK2MSFTNGP02.phx.gbl... > Is there no documentation or instructions anywhere on how WMI needs to be > setup like you would do? Can you reply with those setup instructions? > I'll be honest: I am more than thankful of the help that you have been so > far, but I'm a bit put-off by your insistence at a remote session on my > box. I can follow instructions fairly well, if you can either write them > down or tell me where to look for them. > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:%23ZuOdr6cGHA.4932@TK2MSFTNGP03.phx.gbl... >> No you won't see MicrosoftExchangeV2 there. >> >> You are connecting remotely to the exchange server I take it? There is no >> such animal on Windows XP. >> >> I will need to modify my code sample. I was under the impression you were >> running this local to the server. >> >> I will need to connect you remotely to the given server. However, your >> WMI issue will still need to be resolved. >> >> I strongly suggest while I am working on this issue of you connecting to >> teh exchange server remotely that you contact your admin or boss and >> obtain permission for me to come in and set up your WMI properly. I can't >> guess anymore what you are seeing and what your issues are. >> >> Regardless, I hope to have a remote example for you shortly. >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:OIuLFQ6cGHA.4976@TK2MSFTNGP04.phx.gbl... >>> If I look at the WMI Control Properties, on the Security tab at the >>> Namespace navigation tree, there is no "MicrosoftExchangeV2" under the >>> root node. Does that tell you anything about what might be wrong? Is >>> there something that I need to add? If so, how? Is there something >>> that I need to be 'authorized' by my admin to see? >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:epkG6z5cGHA.5116@TK2MSFTNGP04.phx.gbl... >>>> See if this helps.... >>>> >>>> if not....my only option left to help you is hands on so talk to your >>>> admin or boss or whatever you need to. >>>> >>>> http://www.microsoft.com/technet/prodtechnol/sms/sms2003/opsguide/ops_2fc2.mspx?mfr=true >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:OtGKwb5cGHA.4072@TK2MSFTNGP05.phx.gbl... >>>>> I'm running Windows XP Pro (with all the service packs and updates >>>>> installed) and I verified that the Windows Management Instrumentation >>>>> service is indeed running. There is a Windows Management >>>>> Instrumentation Driver Extensions that is not currently running and is >>>>> listed as Manual. Should that be running as well? >>>>> >>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>> news:uQM3v54cGHA.4224@TK2MSFTNGP04.phx.gbl... >>>>>> Please go to services on the machine and verify "Windows Management >>>>>> Instrumentation" is in fact running. >>>>>> >>>>>> >>>>>> -- >>>>>> Get a powerful web, database, application, and email hosting with KJM >>>>>> Solutions >>>>>> http://www.kjmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>> news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... >>>>>>> With all due respect, I'd prefer not to do that--I don't think my >>>>>>> network admin or my boss would think kindly of it. >>>>>>> >>>>>>> I tried to bring up the WMI under Computer Management and all I see >>>>>>> is a window with the "i" balloon and the message: "Configures and >>>>>>> Controls the Windows Management Instrumentation (WMI) service." >>>>>>> Does this information help any? Is there anything else that I can >>>>>>> check to see why I'm not able to do this? >>>>>>> >>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>> news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... >>>>>>>> Email me off list. I need to set up a remote desktop session with >>>>>>>> you. There is no reason it should not be working. >>>>>>>> >>>>>>>> Kelly >>>>>>>> >>>>>>>> -- >>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>> KJM Solutions >>>>>>>> http://www.kjmsolutions.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>> news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >>>>>>>>> Ok, I'm back to this. I tried one of the queries on this link: >>>>>>>>> http://www.wilsonmar.com/1wmiwbem.htm and am having limited >>>>>>>>> success with it, so I would guess that that means that I have the >>>>>>>>> basics installed for using WMI. So does the fact that I don't >>>>>>>>> have administrator authority on the network explain why I can't >>>>>>>>> query the mail server? >>>>>>>>> >>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>>>>>>>>> Where would I download the WMI SDK, then? I Googled it and all I >>>>>>>>>> came up with was links to an SDK that works for VC++ & VB6. >>>>>>>>>> Surely there's gotta be an update since then. >>>>>>>>>> >>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>> No. >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>> with KJM Solutions >>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>>>>>>>>> If I install the WMI SDK, would I have to install it on >>>>>>>>>>>> whatever box runs this program? 'Cause this will eventually run >>>>>>>>>>>> on a server box. >>>>>>>>>>>> >>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>>>>>>>>> Nothing to do with Active Directory. >>>>>>>>>>>>> >>>>>>>>>>>>> Sounds like you need to install WMI though with System. >>>>>>>>>>>>> Management on there you may hae already. >>>>>>>>>>>>> >>>>>>>>>>>>> Do you have teh WMI SDK on your computer? >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>> Yes, I did add a reference to System.Management, but I'm >>>>>>>>>>>>>> still getting the error. Is it a permissions error that I >>>>>>>>>>>>>> can't do a query like that against the Active Directory? Or >>>>>>>>>>>>>> is Active Directory not even in this picture? >>>>>>>>>>>>>> >>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>> let me know if you did what the screenshot in your email >>>>>>>>>>>>>>> showed. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>>>>> Dim search As New >>>>>>>>>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox >>>>>>>>>>>>>>>> WHERE MailboxDisplayName = 'AR'") >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Try >>>>>>>>>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>>>>>>>>> "Size : " & >>>>>>>>>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>>>>>>>>> "Total Items : " & >>>>>>>>>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>>>>>>>>> Next >>>>>>>>>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>>>>>>>>> Catch ex As Exception >>>>>>>>>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>>>>>>>>> ex.Source.ToString) >>>>>>>>>>>>>>>> End Try >>>>>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>>>>> I really do appreciate your help! >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>>>> Add a reference to system.management >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Kelly >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> P.S. dropped an email in your box you have listed for >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>>>>>>>>> I'm getting "Invalid Namespace" from the >>>>>>>>>>>>>>>>>> System.Management namespace. What am I not doing right? >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>>>> replace below with >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>>>>>>> Imports System >>>>>>>>>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox >>>>>>>>>>>>>>>>>>>> WHERE MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>>>>>> Next >>>>>>>>>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to >>>>>>>>>>>>>>>>>>>> somebody here. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> End Function >>>>>>>>>>>>>>>>>>>> End Class >>>>>>>>>>>>>>>>>>>> End Namespace >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in >>>>>>>>>>>>>>>>>>>> message news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>>>>>> This looks awfully close to what I need. I will be >>>>>>>>>>>>>>>>>>>>> anxious to see Kelly's response as well, but this >>>>>>>>>>>>>>>>>>>>> looks real good. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > Assuming you are doing this on an internal network and not from outside. Pay
attention to "ENTERDOMAIN", "enterpassword", "SERVERNAME", "YOUR NAME". Make sure WMI has remote permissions enabled on the server. If you don't know how to do this or sys admin does not know how, email me off list to arrange a remote desktop session with me. Private Sub SimpleStuff() Try Dim connection As New Management.ConnectionOptions connection.Username = "Administrator" connection.Password = "enterpassword" connection.Authority = "ntlmdomain:ENTERDOMAIN" Dim scope As New Management.ManagementScope( _ "\\SERVERNAME\root\MicrosoftExchangeV2", connection) scope.Connect() Dim query As New Management.ObjectQuery( _ "SELECT * FROM Exchange_Mailbox WHERE MailboxDisplayName = 'YOUR NAME'") Dim searcher As New Management.ManagementObjectSearcher(scope, query) For Each queryObj As Management.ManagementObject In searcher.Get() Debug.WriteLine(queryObj("Size") & vbTab & queryObj("TotalItems")) 'If these items are greater than 0 then exit For and do something with it, send an email or something Next Catch err As Management.ManagementException MessageBox.Show("An error occurred while querying for WMI data: " & err.Message) Catch unauthorizedErr As System.UnauthorizedAccessException MessageBox.Show("Connection error (user name or password might be incorrect): " & unauthorizedErr.Message) End Try End Sub -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Bryan Dickerson" <txprp***@netscape.net> wrote in message news:OIuLFQ6cGHA.4976@TK2MSFTNGP04.phx.gbl... > If I look at the WMI Control Properties, on the Security tab at the > Namespace navigation tree, there is no "MicrosoftExchangeV2" under the > root node. Does that tell you anything about what might be wrong? Is > there something that I need to add? If so, how? Is there something that > I need to be 'authorized' by my admin to see? > > "vbnetdev" <vbnetdev@community.nospam> wrote in message > news:epkG6z5cGHA.5116@TK2MSFTNGP04.phx.gbl... >> See if this helps.... >> >> if not....my only option left to help you is hands on so talk to your >> admin or boss or whatever you need to. >> >> http://www.microsoft.com/technet/prodtechnol/sms/sms2003/opsguide/ops_2fc2.mspx?mfr=true >> >> -- >> Get a powerful web, database, application, and email hosting with KJM >> Solutions >> http://www.kjmsolutions.com >> >> >> >> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >> news:OtGKwb5cGHA.4072@TK2MSFTNGP05.phx.gbl... >>> I'm running Windows XP Pro (with all the service packs and updates >>> installed) and I verified that the Windows Management Instrumentation >>> service is indeed running. There is a Windows Management >>> Instrumentation Driver Extensions that is not currently running and is >>> listed as Manual. Should that be running as well? >>> >>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>> news:uQM3v54cGHA.4224@TK2MSFTNGP04.phx.gbl... >>>> Please go to services on the machine and verify "Windows Management >>>> Instrumentation" is in fact running. >>>> >>>> >>>> -- >>>> Get a powerful web, database, application, and email hosting with KJM >>>> Solutions >>>> http://www.kjmsolutions.com >>>> >>>> >>>> >>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>> news:%239Ro$E4cGHA.3908@TK2MSFTNGP02.phx.gbl... >>>>> With all due respect, I'd prefer not to do that--I don't think my >>>>> network admin or my boss would think kindly of it. >>>>> >>>>> I tried to bring up the WMI under Computer Management and all I see is >>>>> a window with the "i" balloon and the message: "Configures and >>>>> Controls the Windows Management Instrumentation (WMI) service." Does >>>>> this information help any? Is there anything else that I can check to >>>>> see why I'm not able to do this? >>>>> >>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>> news:%23$sud63cGHA.1324@TK2MSFTNGP04.phx.gbl... >>>>>> Email me off list. I need to set up a remote desktop session with >>>>>> you. There is no reason it should not be working. >>>>>> >>>>>> Kelly >>>>>> >>>>>> -- >>>>>> Get a powerful web, database, application, and email hosting with KJM >>>>>> Solutions >>>>>> http://www.kjmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>> news:eapr4t3cGHA.2456@TK2MSFTNGP04.phx.gbl... >>>>>>> Ok, I'm back to this. I tried one of the queries on this link: >>>>>>> http://www.wilsonmar.com/1wmiwbem.htm and am having limited success >>>>>>> with it, so I would guess that that means that I have the basics >>>>>>> installed for using WMI. So does the fact that I don't have >>>>>>> administrator authority on the network explain why I can't query the >>>>>>> mail server? >>>>>>> >>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>> news:e1MwMfucGHA.1276@TK2MSFTNGP03.phx.gbl... >>>>>>>> Where would I download the WMI SDK, then? I Googled it and all I >>>>>>>> came up with was links to an SDK that works for VC++ & VB6. Surely >>>>>>>> there's gotta be an update since then. >>>>>>>> >>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>> news:%23N1cYaucGHA.3632@TK2MSFTNGP02.phx.gbl... >>>>>>>>> No. >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Get a powerful web, database, application, and email hosting with >>>>>>>>> KJM Solutions >>>>>>>>> http://www.kjmsolutions.com >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>> news:edLqT9tcGHA.3840@TK2MSFTNGP04.phx.gbl... >>>>>>>>>> If I install the WMI SDK, would I have to install it on whatever >>>>>>>>>> box runs this program? 'Cause this will eventually run on a >>>>>>>>>> server box. >>>>>>>>>> >>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>> news:euXYT%23rcGHA.5048@TK2MSFTNGP04.phx.gbl... >>>>>>>>>>> Nothing to do with Active Directory. >>>>>>>>>>> >>>>>>>>>>> Sounds like you need to install WMI though with System. >>>>>>>>>>> Management on there you may hae already. >>>>>>>>>>> >>>>>>>>>>> Do you have teh WMI SDK on your computer? >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>> with KJM Solutions >>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>> news:OQHV8nrcGHA.3936@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>> Yes, I did add a reference to System.Management, but I'm still >>>>>>>>>>>> getting the error. Is it a permissions error that I can't do a >>>>>>>>>>>> query like that against the Active Directory? Or is Active >>>>>>>>>>>> Directory not even in this picture? >>>>>>>>>>>> >>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>> news:OR1jcmIcGHA.1264@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>> let me know if you did what the screenshot in your email >>>>>>>>>>>>> showed. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>> news:%23vn1kgIcGHA.4108@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>> Already did that. Would posting a copy of my code help? >>>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>>> Dim search As New >>>>>>>>>>>>>> ManagementObjectSearcher("root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>> MailboxDisplayName = 'AR'") >>>>>>>>>>>>>> >>>>>>>>>>>>>> Try >>>>>>>>>>>>>> For Each objFound As ManagementObject In search.Get >>>>>>>>>>>>>> txtStatus.AppendText("MailboxDisplayName: " & >>>>>>>>>>>>>> objFound("MailboxDisplayName") & vbTab & _ >>>>>>>>>>>>>> "Size : " & >>>>>>>>>>>>>> objFound("Size") & vbTab & _ >>>>>>>>>>>>>> "Total Items : " & >>>>>>>>>>>>>> objFound("TotalItems") & vbNewLine) >>>>>>>>>>>>>> Next >>>>>>>>>>>>>> txtStatus.AppendText(vbNewLine & "Done.") >>>>>>>>>>>>>> Catch ex As Exception >>>>>>>>>>>>>> MsgBox("Error: " & ex.Message.ToString & " in " & >>>>>>>>>>>>>> ex.Source.ToString) >>>>>>>>>>>>>> End Try >>>>>>>>>>>>>> ----------------------------------------------------------------------- >>>>>>>>>>>>>> I really do appreciate your help! >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>> news:O9uIpbIcGHA.3956@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>> Add a reference to system.management >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Kelly >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> P.S. dropped an email in your box you have listed for email >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>> Get a powerful web, database, application, and email hosting >>>>>>>>>>>>>>> with KJM Solutions >>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in message >>>>>>>>>>>>>>> news:uRBDvYIcGHA.2068@TK2MSFTNGP02.phx.gbl... >>>>>>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management >>>>>>>>>>>>>>>> namespace. What am I not doing right? >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>> news:OHVYMLIcGHA.1856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>> replace below with >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> MsgBox(queryObj("Size")) >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> MsgBox(queryObj("TotalItems")) >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> replace this. I am sorry doing it on the fly. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: {0}", >>>>>>>>>>>>>>>>> queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> "vbnetdev" <vbnetdev@community.nospam> wrote in message >>>>>>>>>>>>>>>>> news:uoavLtHcGHA.3632@TK2MSFTNGP05.phx.gbl... >>>>>>>>>>>>>>>>>> Imports System >>>>>>>>>>>>>>>>>> Imports System.Management >>>>>>>>>>>>>>>>>> Imports System.Windows.Forms >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Namespace VIKINGSSUCK >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Public Class THEPACKERSROCK >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Function HELPMENOW() >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Dim searcher As New >>>>>>>>>>>>>>>>>> ManagementObjectSearcher( _ >>>>>>>>>>>>>>>>>> "root\MicrosoftExchangeV2", _ >>>>>>>>>>>>>>>>>> "SELECT * FROM Exchange_Mailbox WHERE >>>>>>>>>>>>>>>>>> MailboxDisplayName = 'Joe Schmo'") >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> For Each queryObj As ManagementObject in >>>>>>>>>>>>>>>>>> searcher.Get() >>>>>>>>>>>>>>>>>> Console.WriteLine("MailboxDisplayName: >>>>>>>>>>>>>>>>>> {0}", queryObj("MailboxDisplayName")) >>>>>>>>>>>>>>>>>> Console.WriteLine("Size: {0}", >>>>>>>>>>>>>>>>>> queryObj("Size")) >>>>>>>>>>>>>>>>>> Console.WriteLine("TotalItems: {0}", >>>>>>>>>>>>>>>>>> queryObj("TotalItems")) >>>>>>>>>>>>>>>>>> Next >>>>>>>>>>>>>>>>>> 'if size or totalitems > 0 Then send an email to somebody >>>>>>>>>>>>>>>>>> here. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> End Function >>>>>>>>>>>>>>>>>> End Class >>>>>>>>>>>>>>>>>> End Namespace >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> Get a powerful web, database, application, and email >>>>>>>>>>>>>>>>>> hosting with KJM Solutions >>>>>>>>>>>>>>>>>> http://www.kjmsolutions.com >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> "Bryan Dickerson" <txprp***@netscape.net> wrote in >>>>>>>>>>>>>>>>>> message news:OEfCFNHcGHA.3856@TK2MSFTNGP03.phx.gbl... >>>>>>>>>>>>>>>>>>> This looks awfully close to what I need. I will be >>>>>>>>>>>>>>>>>>> anxious to see Kelly's response as well, but this looks >>>>>>>>>>>>>>>>>>> real good. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Thanx! >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> "Chris Dunaway" <dunaw***@gmail.com> wrote in message >>>>>>>>>>>>>>>>>>> news:1146850128.728951.179270@j73g2000cwa.googlegroups.com... >>>>>>>>>>>>>>>>>>>> Perhaps this will help: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun03282003.asp >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > I get this error:
'readExchange1.exe': Loaded 'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', No symbols loaded. System.Runtime.InteropServices.COMException (0x80040154): Class not registered at System.Management.ThreadDispatch.Start() at System.Management.ManagementScope.Initialize() at System.Management.ManagementObjectSearcher.Initialize() at System.Management.ManagementObjectSearcher.Get() at readExchange1.Class1.Main(String[] args) in c:\documents and settings\jbailo\my documents\visual studio projects\readexchange1\class1.cs:line 30 The program '[1468] readExchange1.exe' has exited with code 0 (0x0). For the line: System.Management.ManagementObjectSearcher objsearch = new System.Management.ManagementObjectSearcher(exmangescope,objquery); vbnetdev wrote: Show quoteHide quote > Imports System > Imports System.Management > Imports System.Windows.Forms > > Namespace VIKINGSSUCK > > Public Class THEPACKERSROCK > > Function HELPMENOW() > > Dim searcher As New ManagementObjectSearcher( _ > "root\MicrosoftExchangeV2", _ > "SELECT * FROM Exchange_Mailbox WHERE MailboxDisplayName > = 'Joe Schmo'") > > For Each queryObj As ManagementObject in searcher.Get() > Console.WriteLine("MailboxDisplayName: {0}", > queryObj("MailboxDisplayName")) > Console.WriteLine("Size: {0}", queryObj("Size")) > Console.WriteLine("TotalItems: {0}", > queryObj("TotalItems")) > Next > 'if size or totalitems > 0 Then send an email to somebody here. > > End Function > End Class > End Namespace > What is your platform?
-- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:TKydnbO12tCHkvzZnZ2dnUVZ_smdnZ2d@speakeasy.net... > > I get this error: > > 'readExchange1.exe': Loaded > 'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', > No symbols loaded. > System.Runtime.InteropServices.COMException (0x80040154): Class not > registered > at System.Management.ThreadDispatch.Start() > at System.Management.ManagementScope.Initialize() > at System.Management.ManagementObjectSearcher.Initialize() > at System.Management.ManagementObjectSearcher.Get() > at readExchange1.Class1.Main(String[] args) in c:\documents and > settings\jbailo\my documents\visual studio > projects\readexchange1\class1.cs:line 30 > The program '[1468] readExchange1.exe' has exited with code 0 (0x0). > > > For the line: > > System.Management.ManagementObjectSearcher objsearch = new > System.Management.ManagementObjectSearcher(exmangescope,objquery); > > > > vbnetdev wrote: >> Imports System >> Imports System.Management >> Imports System.Windows.Forms >> >> Namespace VIKINGSSUCK >> >> Public Class THEPACKERSROCK >> >> Function HELPMENOW() >> >> Dim searcher As New ManagementObjectSearcher( _ >> "root\MicrosoftExchangeV2", _ >> "SELECT * FROM Exchange_Mailbox WHERE >> MailboxDisplayName = 'Joe Schmo'") >> >> For Each queryObj As ManagementObject in searcher.Get() >> Console.WriteLine("MailboxDisplayName: {0}", >> queryObj("MailboxDisplayName")) >> Console.WriteLine("Size: {0}", queryObj("Size")) >> Console.WriteLine("TotalItems: {0}", >> queryObj("TotalItems")) >> Next >> 'if size or totalitems > 0 Then send an email to somebody here. >> >> End Function >> End Class >> End Namespace >> vbnetdev wrote:
> What is your platform? XP/c# for client.> Tried it with two Exchange backends, one on our local network, one on our WAN. Use the code snippet I posted under this one and let me know.
-- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:44611963.3040501@texeme.com... > vbnetdev wrote: >> What is your platform? >> > > XP/c# for client. > > Tried it with two Exchange backends, one on our local network, one on our > WAN. Are you connecting to an Exchange server on your local machine or another
server on your network? If so use this code: Assuming you are doing this on an internal network and not from outside. Pay attention to "ENTERDOMAIN", "enterpassword", "SERVERNAME", "YOUR NAME". Make sure WMI has remote permissions enabled on the server. If you don't know how to do this or sys admin does not know how, email me off list to arrange a remote desktop session with me. Private Sub SimpleStuff() Try Dim connection As New Management.ConnectionOptions connection.Username = "Administrator" connection.Password = "enterpassword" connection.Authority = "ntlmdomain:ENTERDOMAIN" Dim scope As New Management.ManagementScope( _ "\\SERVERNAME\root\MicrosoftExchangeV2", connection) scope.Connect() Dim query As New Management.ObjectQuery( _ "SELECT * FROM Exchange_Mailbox WHERE MailboxDisplayName = 'YOUR NAME'") Dim searcher As New Management.ManagementObjectSearcher(scope, query) For Each queryObj As Management.ManagementObject In searcher.Get() Debug.WriteLine(queryObj("Size") & vbTab & queryObj("TotalItems")) 'If these items are greater than 0 then exit For and do something with it, send an email or something Next Catch err As Management.ManagementException MessageBox.Show("An error occurred while querying for WMI data: " & err.Message) Catch unauthorizedErr As System.UnauthorizedAccessException MessageBox.Show("Connection error (user name or password might be incorrect): " & unauthorizedErr.Message) End Try End Sub -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:TKydnbO12tCHkvzZnZ2dnUVZ_smdnZ2d@speakeasy.net... > > I get this error: > > 'readExchange1.exe': Loaded > 'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', > No symbols loaded. > System.Runtime.InteropServices.COMException (0x80040154): Class not > registered > at System.Management.ThreadDispatch.Start() > at System.Management.ManagementScope.Initialize() > at System.Management.ManagementObjectSearcher.Initialize() > at System.Management.ManagementObjectSearcher.Get() > at readExchange1.Class1.Main(String[] args) in c:\documents and > settings\jbailo\my documents\visual studio > projects\readexchange1\class1.cs:line 30 > The program '[1468] readExchange1.exe' has exited with code 0 (0x0). > > > For the line: > > System.Management.ManagementObjectSearcher objsearch = new > System.Management.ManagementObjectSearcher(exmangescope,objquery); > > > > vbnetdev wrote: >> Imports System >> Imports System.Management >> Imports System.Windows.Forms >> >> Namespace VIKINGSSUCK >> >> Public Class THEPACKERSROCK >> >> Function HELPMENOW() >> >> Dim searcher As New ManagementObjectSearcher( _ >> "root\MicrosoftExchangeV2", _ >> "SELECT * FROM Exchange_Mailbox WHERE >> MailboxDisplayName = 'Joe Schmo'") >> >> For Each queryObj As ManagementObject in searcher.Get() >> Console.WriteLine("MailboxDisplayName: {0}", >> queryObj("MailboxDisplayName")) >> Console.WriteLine("Size: {0}", queryObj("Size")) >> Console.WriteLine("TotalItems: {0}", >> queryObj("TotalItems")) >> Next >> 'if size or totalitems > 0 Then send an email to somebody here. >> >> End Function >> End Class >> End Namespace >> This example takes me a little further, but is throwing an exception on
the searcher.Get() in the foreach loop: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in system.management.dll Additional information: Class not registered I recoded this in c#, here it is: using System; using System.Diagnostics; using System.Management; namespace readExchange1 { /// <summary> /// Summary description for Class1. /// </summary> class Class1 { static void Main(string[] args) { System.Management.ConnectionOptions connection = new System.Management.ConnectionOptions(); connection.Impersonation = System.Management.ImpersonationLevel.Impersonate; connection.EnablePrivileges = true; string cServername = "MAILXXXX"; connection.Username = "jbailo"; connection.Password = "xxxxxxxx"; connection.Authority = "ntlmdomain:XXXXX"; try { System.Management.ManagementScope exmangescope = new System.Management.ManagementScope(@"\\" + cServername + @"\root\MicrosoftExchangeV2",connection); System.Management.ObjectQuery objquery = new System.Management.ObjectQuery("SELECT * FROM Exchange_Mailbox WHERE MailBoxDisplayName='jbailo'"); System.Management.ManagementObjectSearcher objsearch = new System.Management.ManagementObjectSearcher(exmangescope,objquery); //System.Management.ManagementObjectCollection //queryCollection1 = objsearch.Get(); string strDisplay=string.empty; foreach( System.Management.ManagementObject instmailbox in objsearch.Get() ) { strDisplay = instmailbox["MailboxDisplayName"].ToString() + " " + instmailbox["size"].ToString(); System.Console.WriteLine(strDisplay); } } catch(System.Management.ManagementException me) { Debug.WriteLine(me.ToString());} catch(System.UnauthorizedAccessException uae){ Debug.WriteLine(uae.ToString()); }}}} vbnetdev wrote: Show quoteHide quote > Are you connecting to an Exchange server on your local machine or another > server on your network? If so use this code: > > Assuming you are doing this on an internal network and not from outside. Pay > attention to "ENTERDOMAIN", "enterpassword", "SERVERNAME", "YOUR NAME". Make > sure WMI has remote permissions enabled on the server. If you don't know how > to do this or sys admin does not know how, email me off list to arrange a > remote desktop session with me. > > Private Sub SimpleStuff() > Try > Dim connection As New Management.ConnectionOptions > connection.Username = "Administrator" > connection.Password = "enterpassword" > connection.Authority = "ntlmdomain:ENTERDOMAIN" > > Dim scope As New Management.ManagementScope( _ > "\\SERVERNAME\root\MicrosoftExchangeV2", connection) > scope.Connect() > > Dim query As New Management.ObjectQuery( _ > "SELECT * FROM Exchange_Mailbox WHERE MailboxDisplayName > = 'YOUR NAME'") > > Dim searcher As New Management.ManagementObjectSearcher(scope, > query) > > For Each queryObj As Management.ManagementObject In > searcher.Get() > Debug.WriteLine(queryObj("Size") & vbTab & > queryObj("TotalItems")) > 'If these items are greater than 0 then exit For and do something with it, > send an email or something > Next > > Catch err As Management.ManagementException > MessageBox.Show("An error occurred while querying for WMI data: > " & err.Message) > Catch unauthorizedErr As System.UnauthorizedAccessException > > MessageBox.Show("Connection error (user name or password might > be incorrect): " & unauthorizedErr.Message) > End Try > End Sub > >
http://groups.google.com/group/microsoft.public.dotnet.general/browse_frm/thread/5becf40c6c8f4e11/484c2354cbfed848%23484c2354cbfed848
--
Show quote
Hide quote
Get a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message
news:4461904D.7040707@texeme.com... > > This example takes me a little further, but is throwing an exception on > the searcher.Get() in the foreach loop: > > An unhandled exception of type > 'System.Runtime.InteropServices.COMException' occurred in > system.management.dll > > Additional information: Class not registered > > > > I recoded this in c#, here it is: > > > using System; > using System.Diagnostics; > using System.Management; > > > namespace readExchange1 > { > /// <summary> > /// Summary description for Class1. > /// </summary> > class Class1 > { > static void Main(string[] args) > { > System.Management.ConnectionOptions connection = new > System.Management.ConnectionOptions(); > > connection.Impersonation = > System.Management.ImpersonationLevel.Impersonate; > > connection.EnablePrivileges = true; > > string cServername = "MAILXXXX"; > connection.Username = "jbailo"; > connection.Password = "xxxxxxxx"; > connection.Authority = "ntlmdomain:XXXXX"; > > try > { > System.Management.ManagementScope exmangescope > = new System.Management.ManagementScope(@"\\" + cServername + > @"\root\MicrosoftExchangeV2",connection); > > System.Management.ObjectQuery objquery = new > System.Management.ObjectQuery("SELECT * FROM Exchange_Mailbox WHERE > MailBoxDisplayName='jbailo'"); > System.Management.ManagementObjectSearcher objsearch = new > System.Management.ManagementObjectSearcher(exmangescope,objquery); > //System.Management.ManagementObjectCollection > //queryCollection1 = objsearch.Get(); > > string strDisplay=string.empty; > > foreach( System.Management.ManagementObject instmailbox > in objsearch.Get() ) { > strDisplay = instmailbox["MailboxDisplayName"].ToString() + " " + > instmailbox["size"].ToString(); > System.Console.WriteLine(strDisplay); > } > } catch(System.Management.ManagementException me) { > Debug.WriteLine(me.ToString());} > catch(System.UnauthorizedAccessException uae){ > Debug.WriteLine(uae.ToString()); > }}}} > > > > > > > vbnetdev wrote: >> Are you connecting to an Exchange server on your local machine or another >> server on your network? If so use this code: >> >> Assuming you are doing this on an internal network and not from outside. >> Pay >> attention to "ENTERDOMAIN", "enterpassword", "SERVERNAME", "YOUR NAME". >> Make >> sure WMI has remote permissions enabled on the server. If you don't know >> how >> to do this or sys admin does not know how, email me off list to arrange a >> remote desktop session with me. >> >> Private Sub SimpleStuff() >> Try >> Dim connection As New Management.ConnectionOptions >> connection.Username = "Administrator" >> connection.Password = "enterpassword" >> connection.Authority = "ntlmdomain:ENTERDOMAIN" >> >> Dim scope As New Management.ManagementScope( _ >> "\\SERVERNAME\root\MicrosoftExchangeV2", connection) >> scope.Connect() >> >> Dim query As New Management.ObjectQuery( _ >> "SELECT * FROM Exchange_Mailbox WHERE >> MailboxDisplayName >> = 'YOUR NAME'") >> >> Dim searcher As New >> Management.ManagementObjectSearcher(scope, >> query) >> >> For Each queryObj As Management.ManagementObject In >> searcher.Get() >> Debug.WriteLine(queryObj("Size") & vbTab & >> queryObj("TotalItems")) >> 'If these items are greater than 0 then exit For and do something with >> it, >> send an email or something >> Next >> >> Catch err As Management.ManagementException >> MessageBox.Show("An error occurred while querying for WMI >> data: >> " & err.Message) >> Catch unauthorizedErr As System.UnauthorizedAccessException >> >> MessageBox.Show("Connection error (user name or password >> might >> be incorrect): " & unauthorizedErr.Message) >> End Try >> End Sub >> Yes, I read that post yesterday and I went to the MS site to get the WMI
redistributable, however, I am running XP and that download is for: System Requirements * Supported Operating Systems: Windows 2000 I tried installing it and it would not install on XP. vbnetdev wrote: Show quoteHide quote Hi John,
Okay first after the scope.connect place this MsgBox(scope.IsConnected.ToString) and tell me its answer. Also, make sure the display name for this exchange account is correct. Add under the scope, query statement you currently have: Dim searcher As New Management.ManagementObjectSearcher(scope, query) If searcher.Get.Count = 0 Then MsgBox("THERE WERE NONE") Exit Sub End If if the count = 0 their is soemthing wrong with your display name or it does not exist. Kelly -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:4462129E.4030106@texeme.com... > > Yes, I read that post yesterday and I went to the MS site to get the WMI > redistributable, however, I am running XP and that download is for: > > System Requirements > > * Supported Operating Systems: Windows 2000 > > I tried installing it and it would not install on XP. > > > > > vbnetdev wrote: >> http://groups.google.com/group/microsoft.public.dotnet.general/browse_frm/thread/5becf40c6c8f4e11/484c2354cbfed848%23484c2354cbfed848 > Well, it looks like it's not letting me connect:
System.Management.ManagementScope exmangescope = new System.Management.ManagementScope(@"\\" + cServername + @"\root\MicrosoftExchangeV2",connection); Debug.WriteLine("Connected? " + exmangescope.IsConnected.ToString()); Results in: Connected? False vbnetdev wrote: Show quoteHide quote > Hi John, > > Okay first after the scope.connect place this > > MsgBox(scope.IsConnected.ToString) > > and tell me its answer. > > Also, make sure the display name for this exchange account is correct. > > Add under the scope, query statement you currently have: > > Dim searcher As New Management.ManagementObjectSearcher(scope, query) > > If searcher.Get.Count = 0 Then > MsgBox("THERE WERE NONE") > Exit Sub > End If > if the count = 0 their is soemthing wrong with your display name or it does > not exist. > > Kelly OK now we are getting somewhere.
Run your install on 2000. Verify in component services under COM that remote activiation and launch are allowed. -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:eaadndaSwLu3__7ZRVn-tA@speakeasy.net... > > Well, it looks like it's not letting me connect: > > > System.Management.ManagementScope exmangescope > > = new System.Management.ManagementScope(@"\\" + cServername + > @"\root\MicrosoftExchangeV2",connection); > > Debug.WriteLine("Connected? " + exmangescope.IsConnected.ToString()); > > Results in: > > Connected? False > > > > vbnetdev wrote: >> Hi John, >> >> Okay first after the scope.connect place this >> >> MsgBox(scope.IsConnected.ToString) >> >> and tell me its answer. >> >> Also, make sure the display name for this exchange account is correct. >> >> Add under the scope, query statement you currently have: >> >> Dim searcher As New Management.ManagementObjectSearcher(scope, query) >> >> If searcher.Get.Count = 0 Then >> MsgBox("THERE WERE NONE") >> Exit Sub >> End If >> if the count = 0 their is soemthing wrong with your display name or it >> does not exist. >> >> Kelly I would like to get back to this.
Ok, I'm looking at the component services browser on my server. What category should I look in, and for what COM object? vbnetdev wrote: Show quoteHide quote > OK now we are getting somewhere. > > Run your install on 2000. Verify in component services under COM that remote > activiation and launch are allowed. > on both the server adn the client Select Component Services/Computers/My
Computer. Right click on "My Computer" and under COM Security Edit the defaults under Access and Launch and Activation Permissions to make sure your account has full permissions to perform these actions. -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:3KWdnX7-Up5cPfbZnZ2dnUVZ_tSdnZ2d@speakeasy.net... > > I would like to get back to this. > > Ok, I'm looking at the component services browser on my server. What > category should I look in, and for what COM object? > > > vbnetdev wrote: >> OK now we are getting somewhere. >> >> Run your install on 2000. Verify in component services under COM that >> remote activiation and launch are allowed. >> by the way you did run the
scope.connect statement prior to teh debug.writeline command right? -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:eaadndaSwLu3__7ZRVn-tA@speakeasy.net... > > Well, it looks like it's not letting me connect: > > > System.Management.ManagementScope exmangescope > > = new System.Management.ManagementScope(@"\\" + cServername + > @"\root\MicrosoftExchangeV2",connection); > > Debug.WriteLine("Connected? " + exmangescope.IsConnected.ToString()); > > Results in: > > Connected? False > > > > vbnetdev wrote: >> Hi John, >> >> Okay first after the scope.connect place this >> >> MsgBox(scope.IsConnected.ToString) >> >> and tell me its answer. >> >> Also, make sure the display name for this exchange account is correct. >> >> Add under the scope, query statement you currently have: >> >> Dim searcher As New Management.ManagementObjectSearcher(scope, query) >> >> If searcher.Get.Count = 0 Then >> MsgBox("THERE WERE NONE") >> Exit Sub >> End If >> if the count = 0 their is soemthing wrong with your display name or it >> does not exist. >> >> Kelly Ooops.
No I didn't have a .connect() method. When I add it, it goes back to the COMException error. I'll follow what you recommended in your other post about adding the COM object. The thread '<No Name>' (0xcc) has exited with code 0 (0x0). 'readExchange1.exe': Loaded 'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', No symbols loaded. System.Runtime.InteropServices.COMException (0x80040154): Class not registered at System.Management.ThreadDispatch.Start() at System.Management.ManagementScope.Initialize() at System.Management.ManagementScope.Connect() at readExchange1.Class1.Main(String[] args) in c:\documents and settings\jbailo\my documents\visual studio projects\readexchange1\class1.cs:line 36 vbnetdev wrote: Show quoteHide quote > by the way you did run the > > scope.connect statement prior to teh debug.writeline command right? > We dont need to update your computer but rather the computer Exchange is
sitting on. -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:4462129E.4030106@texeme.com... > > Yes, I read that post yesterday and I went to the MS site to get the WMI > redistributable, however, I am running XP and that download is for: > > System Requirements > > * Supported Operating Systems: Windows 2000 > > I tried installing it and it would not install on XP. > > > > > vbnetdev wrote: >> http://groups.google.com/group/microsoft.public.dotnet.general/browse_frm/thread/5becf40c6c8f4e11/484c2354cbfed848%23484c2354cbfed848 > So, I should run this install on that server? It's a w2k so it should
install. BTW -- I tried connecting to another mail server which I think is running w2003. There was no COM error, but it threw an authentication error. (I locked myself out of my NT domain account by running it actually!). Anyway, I'm going to keep testing on the w2k server since its "safer". vbnetdev wrote: Show quoteHide quote > We dont need to update your computer but rather the computer Exchange is > sitting on. > Can you tell me what the authentication error was? (text of error). Testing
on a production server is never advisable obviously. -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:apWdnRlrnIwdwv7ZnZ2dnUVZ_vadnZ2d@speakeasy.net... > > So, I should run this install on that server? It's a w2k so it should > install. > > BTW -- I tried connecting to another mail server which I think is running > w2003. There was no COM error, but it threw an authentication error. > (I locked myself out of my NT domain account by running it actually!). > > Anyway, I'm going to keep testing on the w2k server since its "safer". > > > vbnetdev wrote: >> We dont need to update your computer but rather the computer Exchange is >> sitting on. >> > Ignore the remote desktop request that was from another user I had tried to
help. I suspect you wont need it. -- Show quoteHide quoteGet a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "John A. Bailo" <jaba***@texeme.com> wrote in message news:TKydnbO12tCHkvzZnZ2dnUVZ_smdnZ2d@speakeasy.net... > > I get this error: > > 'readExchange1.exe': Loaded > 'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', > No symbols loaded. > System.Runtime.InteropServices.COMException (0x80040154): Class not > registered > at System.Management.ThreadDispatch.Start() > at System.Management.ManagementScope.Initialize() > at System.Management.ManagementObjectSearcher.Initialize() > at System.Management.ManagementObjectSearcher.Get() > at readExchange1.Class1.Main(String[] args) in c:\documents and > settings\jbailo\my documents\visual studio > projects\readexchange1\class1.cs:line 30 > The program '[1468] readExchange1.exe' has exited with code 0 (0x0). > > > For the line: > > System.Management.ManagementObjectSearcher objsearch = new > System.Management.ManagementObjectSearcher(exmangescope,objquery); > > > > vbnetdev wrote: >> Imports System >> Imports System.Management >> Imports System.Windows.Forms >> >> Namespace VIKINGSSUCK >> >> Public Class THEPACKERSROCK >> >> Function HELPMENOW() >> >> Dim searcher As New ManagementObjectSearcher( _ >> "root\MicrosoftExchangeV2", _ >> "SELECT * FROM Exchange_Mailbox WHERE >> MailboxDisplayName = 'Joe Schmo'") >> >> For Each queryObj As ManagementObject in searcher.Get() >> Console.WriteLine("MailboxDisplayName: {0}", >> queryObj("MailboxDisplayName")) >> Console.WriteLine("Size: {0}", queryObj("Size")) >> Console.WriteLine("TotalItems: {0}", >> queryObj("TotalItems")) >> Next >> 'if size or totalitems > 0 Then send an email to somebody here. >> >> End Function >> End Class >> End Namespace >> I've written a similar program in VS 2003 that gathers a few statistics
about Exchange users using Redemption Objects which you can find at http://dimastr.com/redemption/ . Saved me a lot of time and effort and if I'm not mistaken, doesn't cost anything as long as you aren't distributing it in a commercial product. It's a COM library which may or may not be what you were looking for. I haven't used 2005 myself and I'm not familiar how it does COM interop.
ReadXML after File Copy
WebBrowser WindowClosing VB2005 timing/speed problem File Names: List Long file Names from Database List of short file names Recursive WebRequest.Create() Call Lisp Program from vb.net help logging events to txt file System.Uri.UserEscaped set focus from treeview to control Compiling internally instead of as a DLL? |
|||||||||||||||||||||||