469,332 Members | 6,649 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,332 developers. It's quick & easy.

Read Emails on Exchange server without OL client

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
May 5 '06 #1
62 3035
http://msdn.microsoft.com/library/de...ore_events.asp

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:%2****************@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

May 5 '06 #2
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" <vb******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
http://msdn.microsoft.com/library/de...ore_events.asp

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:%2****************@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


May 5 '06 #3
There is but I need to think about this. I hope you have some time. It will
take some doing.

Kelly

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:uh**************@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" <vb******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
http://msdn.microsoft.com/library/de...ore_events.asp

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:%2****************@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



May 5 '06 #4
Chris Dunaway wrote:
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp


That's pop3, not exchange.
May 5 '06 #6
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.
May 5 '06 #7
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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp

May 5 '06 #8
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.

May 5 '06 #9
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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp


May 5 '06 #10
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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp


May 5 '06 #11
I'll give this a shot.

"vbnetdev" <vb******@community.nospam> wrote in message
news:uo**************@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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp



May 5 '06 #12
I guess I don't follow...

"vbnetdev" <vb******@community.nospam> wrote in message
news:%2****************@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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp



May 5 '06 #13
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" <tx******@netscape.net> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
I'll give this a shot.

"vbnetdev" <vb******@community.nospam> wrote in message
news:uo**************@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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp



May 5 '06 #14
lots to find on google : ldap , cdoex , exoledb , webdav

"John A. Bailo" <ja*****@texeme.com> wrote in message
news:44************@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.

May 5 '06 #15
exchange supports pop3 & imap

"John A. Bailo" <ja*****@texeme.com> wrote in message
news:44**************@texeme.com...
Chris Dunaway wrote:
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp


That's pop3, not exchange.

May 5 '06 #16
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" <vb******@community.nospam> wrote in message
news:uo**************@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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp



May 5 '06 #17
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" <vb******@community.nospam> wrote in message
news:un****************@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" <tx******@netscape.net> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
I'll give this a shot.

"vbnetdev" <vb******@community.nospam> wrote in message
news:uo**************@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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
> Perhaps this will help:
>
> http://msdn.microsoft.com/library/de...un03282003.asp
>



May 5 '06 #18
I am not sure what you are asking.

Did the code sample solve your dilemma if knowing if the mailbox is empty?

Kelly

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:es**************@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" <vb******@community.nospam> wrote in message
news:un****************@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" <tx******@netscape.net> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
I'll give this a shot.

"vbnetdev" <vb******@community.nospam> wrote in message
news:uo**************@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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
> news:11**********************@j73g2000cwa.googlegr oups.com...
>> Perhaps this will help:
>>
>> http://msdn.microsoft.com/library/de...un03282003.asp
>>
>
>



May 5 '06 #19
I'm getting "Invalid Namespace" from the System.Management namespace. What
am I not doing right?

"vbnetdev" <vb******@community.nospam> wrote in message
news:OH**************@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" <vb******@community.nospam> wrote in message
news:uo**************@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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
Perhaps this will help:

http://msdn.microsoft.com/library/de...un03282003.asp



May 5 '06 #20
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" <tx******@netscape.net> wrote in message
news:uR**************@TK2MSFTNGP02.phx.gbl...
I'm getting "Invalid Namespace" from the System.Management namespace.
What am I not doing right?

"vbnetdev" <vb******@community.nospam> wrote in message
news:OH**************@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" <vb******@community.nospam> wrote in message
news:uo**************@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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
news:11**********************@j73g2000cwa.googlegr oups.com...
> Perhaps this will help:
>
> http://msdn.microsoft.com/library/de...un03282003.asp
>



May 5 '06 #21
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" <vb******@community.nospam> wrote in message
news:O9**************@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" <tx******@netscape.net> wrote in message
news:uR**************@TK2MSFTNGP02.phx.gbl...
I'm getting "Invalid Namespace" from the System.Management namespace.
What am I not doing right?

"vbnetdev" <vb******@community.nospam> wrote in message
news:OH**************@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" <vb******@community.nospam> wrote in message
news:uo**************@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" <tx******@netscape.net> wrote in message
news:OE**************@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" <du******@gmail.com> wrote in message
> news:11**********************@j73g2000cwa.googlegr oups.com...
>> Perhaps this will help:
>>
>> http://msdn.microsoft.com/library/de...un03282003.asp
>>
>
>



May 5 '06 #22
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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:O9**************@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" <tx******@netscape.net> wrote in message
news:uR**************@TK2MSFTNGP02.phx.gbl...
I'm getting "Invalid Namespace" from the System.Management namespace.
What am I not doing right?

"vbnetdev" <vb******@community.nospam> wrote in message
news:OH**************@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" <vb******@community.nospam> wrote in message
news:uo**************@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" <tx******@netscape.net> wrote in message
> news:OE**************@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" <du******@gmail.com> wrote in message
>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>> Perhaps this will help:
>>>
>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>
>>
>>
>
>



May 5 '06 #23
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" <vb******@community.nospam> wrote in message
news:OR**************@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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:O9**************@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" <tx******@netscape.net> wrote in message
news:uR**************@TK2MSFTNGP02.phx.gbl...
I'm getting "Invalid Namespace" from the System.Management namespace.
What am I not doing right?

"vbnetdev" <vb******@community.nospam> wrote in message
news:OH**************@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" <vb******@community.nospam> wrote in message
> news:uo**************@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" <tx******@netscape.net> wrote in message
>> news:OE**************@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" <du******@gmail.com> wrote in message
>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>> Perhaps this will help:
>>>>
>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>
>>>
>>>
>>
>>
>
>



May 8 '06 #24
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" <tx******@netscape.net> wrote in message
news:OQ**************@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" <vb******@community.nospam> wrote in message
news:OR**************@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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:O9**************@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" <tx******@netscape.net> wrote in message
news:uR**************@TK2MSFTNGP02.phx.gbl...
> I'm getting "Invalid Namespace" from the System.Management namespace.
> What am I not doing right?
>
> "vbnetdev" <vb******@community.nospam> wrote in message
> news:OH**************@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" <vb******@community.nospam> wrote in message
>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>> Perhaps this will help:
>>>>>
>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 8 '06 #25
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" <vb******@community.nospam> wrote in message
news:eu****************@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" <tx******@netscape.net> wrote in message
news:OQ**************@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" <vb******@community.nospam> wrote in message
news:OR**************@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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:O9**************@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" <tx******@netscape.net> wrote in message
> news:uR**************@TK2MSFTNGP02.phx.gbl...
>> I'm getting "Invalid Namespace" from the System.Management namespace.
>> What am I not doing right?
>>
>> "vbnetdev" <vb******@community.nospam> wrote in message
>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>> Perhaps this will help:
>>>>>>
>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 8 '06 #26
No.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:ed**************@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" <vb******@community.nospam> wrote in message
news:eu****************@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" <tx******@netscape.net> wrote in message
news:OQ**************@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" <vb******@community.nospam> wrote in message
news:OR**************@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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
> news:O9**************@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" <tx******@netscape.net> wrote in message
>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>> I'm getting "Invalid Namespace" from the System.Management
>>> namespace. What am I not doing right?
>>>
>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>> Perhaps this will help:
>>>>>>>
>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 8 '06 #27
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" <vb******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
No.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:ed**************@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" <vb******@community.nospam> wrote in message
news:eu****************@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" <tx******@netscape.net> wrote in message
news:OQ**************@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" <vb******@community.nospam> wrote in message
news:OR**************@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" <tx******@netscape.net> wrote in message
> news:%2****************@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" <vb******@community.nospam> wrote in message
>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>> I'm getting "Invalid Namespace" from the System.Management
>>>> namespace. What am I not doing right?
>>>>
>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>> Perhaps this will help:
>>>>>>>>
>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 8 '06 #28
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" <tx******@netscape.net> wrote in message
news:e1**************@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" <vb******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
No.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:ed**************@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" <vb******@community.nospam> wrote in message
news:eu****************@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" <tx******@netscape.net> wrote in message
news:OQ**************@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" <vb******@community.nospam> wrote in message
> news:OR**************@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" <tx******@netscape.net> wrote in message
>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>> namespace. What am I not doing right?
>>>>>
>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>> Perhaps this will help:
>>>>>>>>>
>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #29
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" <tx******@netscape.net> wrote in message
news:ea**************@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" <tx******@netscape.net> wrote in message
news:e1**************@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" <vb******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
No.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:ed**************@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" <vb******@community.nospam> wrote in message
news:eu****************@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" <tx******@netscape.net> wrote in message
> news:OQ**************@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" <vb******@community.nospam> wrote in message
>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>> namespace. What am I not doing right?
>>>>>>
>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>
>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #30
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" <vb******@community.nospam> wrote in message
news:%2****************@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" <tx******@netscape.net> wrote in message
news:ea**************@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" <tx******@netscape.net> wrote in message
news:e1**************@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" <vb******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
No.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:ed**************@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" <vb******@community.nospam> wrote in message
> news:eu****************@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" <tx******@netscape.net> wrote in message
>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>>> namespace. What am I not doing right?
>>>>>>>
>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>
>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #31
wmi is included with every desktop everywhere except Win9x crap right?

May 10 '06 #32
Liz

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:%2****************@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?

May 10 '06 #33
Are you running Windows 2000? Or what is your platform?

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:%2****************@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" <tx******@netscape.net> wrote in message
news:ea**************@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" <tx******@netscape.net> wrote in message
news:e1**************@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" <vb******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
> No.
>
> --
> Get a powerful web, database, application, and email hosting with KJM
> Solutions
> http://www.kjmsolutions.com
>
>
>
> "Bryan Dickerson" <tx******@netscape.net> wrote in message
> news:ed**************@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" <vb******@community.nospam> wrote in message
>> news:eu****************@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" <tx******@netscape.net> wrote in message
>>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>>>> namespace. What am I not doing right?
>>>>>>>>
>>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>>
>>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #34
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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:%2****************@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" <tx******@netscape.net> wrote in message
news:ea**************@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" <tx******@netscape.net> wrote in message
news:e1**************@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" <vb******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
> No.
>
> --
> Get a powerful web, database, application, and email hosting with KJM
> Solutions
> http://www.kjmsolutions.com
>
>
>
> "Bryan Dickerson" <tx******@netscape.net> wrote in message
> news:ed**************@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" <vb******@community.nospam> wrote in message
>> news:eu****************@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" <tx******@netscape.net> wrote in message
>>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>>>> namespace. What am I not doing right?
>>>>>>>>
>>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>>
>>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #35
I apologize. Normally I am better at answering questions than this. Just
have had some road blocks.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Liz" <li*@no-spam.org> wrote in message
news:g6*********************@fe09.news.easynews.co m...

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:%2****************@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?


May 10 '06 #36
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.

"Liz" <li*@no-spam.org> wrote in message
news:g6*********************@fe09.news.easynews.co m...

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:%2****************@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?


May 10 '06 #37
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" <vb******@community.nospam> wrote in message
news:uQ**************@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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:%2****************@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" <tx******@netscape.net> wrote in message
news:ea**************@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" <tx******@netscape.net> wrote in message
news:e1**************@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" <vb******@community.nospam> wrote in message
> news:%2****************@TK2MSFTNGP02.phx.gbl...
>> No.
>>
>> --
>> Get a powerful web, database, application, and email hosting with KJM
>> Solutions
>> http://www.kjmsolutions.com
>>
>>
>>
>> "Bryan Dickerson" <tx******@netscape.net> wrote in message
>> news:ed**************@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" <vb******@community.nospam> wrote in message
>>> news:eu****************@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" <tx******@netscape.net> wrote in message
>>>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>>>>> namespace. What am I not doing right?
>>>>>>>>>
>>>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #38
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/pro....mspx?mfr=true

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:Ot**************@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" <vb******@community.nospam> wrote in message
news:uQ**************@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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:%2****************@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" <tx******@netscape.net> wrote in message
news:ea**************@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" <tx******@netscape.net> wrote in message
> news:e1**************@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" <vb******@community.nospam> wrote in message
>> news:%2****************@TK2MSFTNGP02.phx.gbl...
>>> No.
>>>
>>> --
>>> Get a powerful web, database, application, and email hosting with
>>> KJM Solutions
>>> http://www.kjmsolutions.com
>>>
>>>
>>>
>>> "Bryan Dickerson" <tx******@netscape.net> wrote in message
>>> news:ed**************@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" <vb******@community.nospam> wrote in message
>>>> news:eu****************@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" <tx******@netscape.net> wrote in message
>>>>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>>>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>>>>>> namespace. What am I not doing right?
>>>>>>>>>>
>>>>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #39
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" <vb******@community.nospam> wrote in message
news:ep**************@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/pro....mspx?mfr=true

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:Ot**************@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" <vb******@community.nospam> wrote in message
news:uQ**************@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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:%2****************@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" <tx******@netscape.net> wrote in message
> news:ea**************@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" <tx******@netscape.net> wrote in message
>> news:e1**************@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" <vb******@community.nospam> wrote in message
>>> news:%2****************@TK2MSFTNGP02.phx.gbl...
>>>> No.
>>>>
>>>> --
>>>> Get a powerful web, database, application, and email hosting with
>>>> KJM Solutions
>>>> http://www.kjmsolutions.com
>>>>
>>>>
>>>>
>>>> "Bryan Dickerson" <tx******@netscape.net> wrote in message
>>>> news:ed**************@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" <vb******@community.nospam> wrote in message
>>>>> news:eu****************@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" <tx******@netscape.net> wrote in message
>>>>>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>>>>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>>>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>>>>>>> namespace. What am I not doing right?
>>>>>>>>>>>
>>>>>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>>>>> news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #40
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" <tx******@netscape.net> wrote in message
news:OI**************@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" <vb******@community.nospam> wrote in message
news:ep**************@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/pro....mspx?mfr=true

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:Ot**************@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" <vb******@community.nospam> wrote in message
news:uQ**************@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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
> news:%2****************@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" <tx******@netscape.net> wrote in message
>> news:ea**************@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" <tx******@netscape.net> wrote in message
>>> news:e1**************@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" <vb******@community.nospam> wrote in message
>>>> news:%2****************@TK2MSFTNGP02.phx.gbl...
>>>>> No.
>>>>>
>>>>> --
>>>>> Get a powerful web, database, application, and email hosting with
>>>>> KJM Solutions
>>>>> http://www.kjmsolutions.com
>>>>>
>>>>>
>>>>>
>>>>> "Bryan Dickerson" <tx******@netscape.net> wrote in message
>>>>> news:ed**************@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" <vb******@community.nospam> wrote in message
>>>>>> news:eu****************@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" <tx******@netscape.net> wrote in message
>>>>>>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>>>>>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>>>>>>>> namespace. What am I not doing right?
>>>>>>>>>>>>
>>>>>>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in
>>>>>>>>>>>>>> message news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #41
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" <vb******@community.nospam> wrote in message
news:%2****************@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" <tx******@netscape.net> wrote in message
news:OI**************@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" <vb******@community.nospam> wrote in message
news:ep**************@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/pro....mspx?mfr=true

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:Ot**************@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" <vb******@community.nospam> wrote in message
news:uQ**************@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" <tx******@netscape.net> wrote in message
> news:%2****************@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" <vb******@community.nospam> wrote in message
>> news:%2****************@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" <tx******@netscape.net> wrote in message
>>> news:ea**************@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" <tx******@netscape.net> wrote in message
>>>> news:e1**************@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" <vb******@community.nospam> wrote in message
>>>>> news:%2****************@TK2MSFTNGP02.phx.gbl...
>>>>>> No.
>>>>>>
>>>>>> --
>>>>>> Get a powerful web, database, application, and email hosting with
>>>>>> KJM Solutions
>>>>>> http://www.kjmsolutions.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Bryan Dickerson" <tx******@netscape.net> wrote in message
>>>>>> news:ed**************@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" <vb******@community.nospam> wrote in message
>>>>>>> news:eu****************@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" <tx******@netscape.net> wrote in message
>>>>>>>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>>>>>>>>> namespace. What am I not doing right?
>>>>>>>>>>>>>
>>>>>>>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in
>>>>>>>>>>>>>>> message news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #42
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

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:OI**************@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" <vb******@community.nospam> wrote in message
news:ep**************@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/pro....mspx?mfr=true

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:Ot**************@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" <vb******@community.nospam> wrote in message
news:uQ**************@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" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
> news:%2****************@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" <tx******@netscape.net> wrote in message
>> news:ea**************@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" <tx******@netscape.net> wrote in message
>>> news:e1**************@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" <vb******@community.nospam> wrote in message
>>>> news:%2****************@TK2MSFTNGP02.phx.gbl...
>>>>> No.
>>>>>
>>>>> --
>>>>> Get a powerful web, database, application, and email hosting with
>>>>> KJM Solutions
>>>>> http://www.kjmsolutions.com
>>>>>
>>>>>
>>>>>
>>>>> "Bryan Dickerson" <tx******@netscape.net> wrote in message
>>>>> news:ed**************@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" <vb******@community.nospam> wrote in message
>>>>>> news:eu****************@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" <tx******@netscape.net> wrote in message
>>>>>>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>>>>>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>>>>>>> I'm getting "Invalid Namespace" from the System.Management
>>>>>>>>>>>> namespace. What am I not doing right?
>>>>>>>>>>>>
>>>>>>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in
>>>>>>>>>>>>>> message news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #43
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.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:%2****************@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" <vb******@community.nospam> wrote in message
news:%2****************@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" <tx******@netscape.net> wrote in message
news:OI**************@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" <vb******@community.nospam> wrote in message
news:ep**************@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/pro....mspx?mfr=true

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Bryan Dickerson" <tx******@netscape.net> wrote in message
news:Ot**************@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" <vb******@community.nospam> wrote in message
> news:uQ**************@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" <tx******@netscape.net> wrote in message
>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>> news:%2****************@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" <tx******@netscape.net> wrote in message
>>>> news:ea**************@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" <tx******@netscape.net> wrote in message
>>>>> news:e1**************@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" <vb******@community.nospam> wrote in message
>>>>>> news:%2****************@TK2MSFTNGP02.phx.gbl...
>>>>>>> No.
>>>>>>>
>>>>>>> --
>>>>>>> Get a powerful web, database, application, and email hosting
>>>>>>> with KJM Solutions
>>>>>>> http://www.kjmsolutions.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> "Bryan Dickerson" <tx******@netscape.net> wrote in message
>>>>>>> news:ed**************@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" <vb******@community.nospam> wrote in message
>>>>>>>> news:eu****************@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" <tx******@netscape.net> wrote in message
>>>>>>>>> news:OQ**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>> news:OR**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>>> news:%2****************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>>>> news:O9**************@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" <tx******@netscape.net> wrote in message
>>>>>>>>>>>>> news:uR**************@TK2MSFTNGP02.phx.gbl...
>>>>>>>>>>>>>> I'm getting "Invalid Namespace" from the
>>>>>>>>>>>>>> System.Management namespace. What am I not doing right?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> "vbnetdev" <vb******@community.nospam> wrote in message
>>>>>>>>>>>>>> news:OH**************@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" <vb******@community.nospam> wrote in message
>>>>>>>>>>>>>>> news:uo**************@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" <tx******@netscape.net> wrote in
>>>>>>>>>>>>>>>> message news:OE**************@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" <du******@gmail.com> wrote in message
>>>>>>>>>>>>>>>>> news:11**********************@j73g2000cwa.googlegr oups.com...
>>>>>>>>>>>>>>>>>> Perhaps this will help:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #44

I get this error:

'readExchange1.exe': Loaded
'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a 5c561934e089\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.Initial ize()
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(exmange scope,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

May 10 '06 #45
What is your platform?

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"John A. Bailo" <ja*****@texeme.com> wrote in message
news:TK******************************@speakeasy.ne t...

I get this error:

'readExchange1.exe': Loaded
'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a 5c561934e089\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.Initial ize()
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(exmange scope,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

May 10 '06 #46
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
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"John A. Bailo" <ja*****@texeme.com> wrote in message
news:TK******************************@speakeasy.ne t...

I get this error:

'readExchange1.exe': Loaded
'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a 5c561934e089\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.Initial ize()
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(exmange scope,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

May 10 '06 #47
Ignore the remote desktop request that was from another user I had tried to
help. I suspect you wont need it.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"John A. Bailo" <ja*****@texeme.com> wrote in message
news:TK******************************@speakeasy.ne t...

I get this error:

'readExchange1.exe': Loaded
'c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a 5c561934e089\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.Initial ize()
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(exmange scope,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

May 10 '06 #48
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.
May 10 '06 #49
Use the code snippet I posted under this one and let me know.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"John A. Bailo" <ja*****@texeme.com> wrote in message
news:44**************@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.

May 10 '06 #50

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.