473,902 Members | 4,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
62 3474
Add a reference to system.manageme nt

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******@netsc ape.net> wrote in message
news:uR******** ******@TK2MSFTN GP02.phx.gbl...
I'm getting "Invalid Namespace" from the System.Manageme nt namespace.
What am I not doing right?

"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:OH******** ******@TK2MSFTN GP03.phx.gbl...
replace below with

MsgBox(queryObj ("Size"))

MsgBox(queryObj ("TotalItems "))
replace this. I am sorry doing it on the fly.

Console.WriteLi ne("MailboxDisp layName: {0}",
queryObj("Mailb oxDisplayName") )
Console.WriteLi ne("Size: {0}", queryObj("Size" ))
Console.WriteLi ne("TotalItems : {0}",
queryObj("Total Items"))
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:uo******** ******@TK2MSFTN GP05.phx.gbl...
Imports System
Imports System.Manageme nt
Imports System.Windows. Forms

Namespace VIKINGSSUCK

Public Class THEPACKERSROCK

Function HELPMENOW()

Dim searcher As New ManagementObjec tSearcher( _
"root\Microsoft ExchangeV2", _
"SELECT * FROM Exchange_Mailbo x WHERE
MailboxDisplayN ame = 'Joe Schmo'")

For Each queryObj As ManagementObjec t in searcher.Get()
Console.WriteLi ne("MailboxDisp layName: {0}",
queryObj("Mailb oxDisplayName") )
Console.WriteLi ne("Size: {0}", queryObj("Size" ))
Console.WriteLi ne("TotalItems : {0}",
queryObj("Total Items"))
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******@netsc ape.net> wrote in message
news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.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 ManagementObjec tSearcher("root \MicrosoftExcha ngeV2",
_
"SELECT * FROM Exchange_Mailbo x WHERE
MailboxDisplayN ame = 'AR'")

Try
For Each objFound As ManagementObjec t In search.Get
txtStatus.Appen dText("MailboxD isplayName: " &
objFound("Mailb oxDisplayName") & vbTab & _
"Size : " & objFound("Size" ) &
vbTab & _
"Total Items : " &
objFound("Total Items") & vbNewLine)
Next
txtStatus.Appen dText(vbNewLine & "Done.")
Catch ex As Exception
MsgBox("Error: " & ex.Message.ToSt ring & " in " &
ex.Source.ToStr ing)
End Try
-----------------------------------------------------------------------
I really do appreciate your help!
"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:O9******** ******@TK2MSFTN GP05.phx.gbl...
Add a reference to system.manageme nt

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******@netsc ape.net> wrote in message
news:uR******** ******@TK2MSFTN GP02.phx.gbl...
I'm getting "Invalid Namespace" from the System.Manageme nt namespace.
What am I not doing right?

"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:OH******** ******@TK2MSFTN GP03.phx.gbl...
replace below with

MsgBox(queryObj ("Size"))

MsgBox(queryObj ("TotalItems "))
replace this. I am sorry doing it on the fly.

Console.WriteLi ne("MailboxDisp layName: {0}",
queryObj("Mailb oxDisplayName") )
Console.WriteLi ne("Size: {0}", queryObj("Size" ))
Console.WriteLi ne("TotalItems : {0}",
queryObj("Total Items"))
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:uo******** ******@TK2MSFTN GP05.phx.gbl...
Imports System
Imports System.Manageme nt
Imports System.Windows. Forms

Namespace VIKINGSSUCK

Public Class THEPACKERSROCK

Function HELPMENOW()

Dim searcher As New ManagementObjec tSearcher( _
"root\Microsoft ExchangeV2", _
"SELECT * FROM Exchange_Mailbo x WHERE
MailboxDisplayN ame = 'Joe Schmo'")

For Each queryObj As ManagementObjec t in searcher.Get()
Console.WriteLi ne("MailboxDisp layName: {0}",
queryObj("Mailb oxDisplayName") )
Console.WriteLi ne("Size: {0}", queryObj("Size" ))
Console.WriteLi ne("TotalItems : {0}",
queryObj("Total Items"))
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******@netsc ape.net> wrote in message
news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.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******@netsc ape.net> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Already did that. Would posting a copy of my code help?
-----------------------------------------------------------------------
Dim search As New
ManagementObjec tSearcher("root \MicrosoftExcha ngeV2", _
"SELECT * FROM Exchange_Mailbo x WHERE
MailboxDisplayN ame = 'AR'")

Try
For Each objFound As ManagementObjec t In search.Get
txtStatus.Appen dText("MailboxD isplayName: " &
objFound("Mailb oxDisplayName") & vbTab & _
"Size : " & objFound("Size" )
& vbTab & _
"Total Items : " &
objFound("Total Items") & vbNewLine)
Next
txtStatus.Appen dText(vbNewLine & "Done.")
Catch ex As Exception
MsgBox("Error: " & ex.Message.ToSt ring & " in " &
ex.Source.ToStr ing)
End Try
-----------------------------------------------------------------------
I really do appreciate your help!
"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:O9******** ******@TK2MSFTN GP05.phx.gbl...
Add a reference to system.manageme nt

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******@netsc ape.net> wrote in message
news:uR******** ******@TK2MSFTN GP02.phx.gbl...
I'm getting "Invalid Namespace" from the System.Manageme nt namespace.
What am I not doing right?

"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:OH******** ******@TK2MSFTN GP03.phx.gbl...
replace below with

MsgBox(queryObj ("Size"))

MsgBox(queryObj ("TotalItems "))
replace this. I am sorry doing it on the fly.

Console.WriteLi ne("MailboxDisp layName: {0}",
queryObj("Mailb oxDisplayName") )
Console.WriteLi ne("Size: {0}", queryObj("Size" ))
Console.WriteLi ne("TotalItems : {0}",
queryObj("Total Items"))
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:uo******** ******@TK2MSFTN GP05.phx.gbl...
> Imports System
> Imports System.Manageme nt
> Imports System.Windows. Forms
>
> Namespace VIKINGSSUCK
>
> Public Class THEPACKERSROCK
>
> Function HELPMENOW()
>
> Dim searcher As New ManagementObjec tSearcher( _
> "root\Microsoft ExchangeV2", _
> "SELECT * FROM Exchange_Mailbo x WHERE
> MailboxDisplayN ame = 'Joe Schmo'")
>
> For Each queryObj As ManagementObjec t in searcher.Get()
> Console.WriteLi ne("MailboxDisp layName: {0}",
> queryObj("Mailb oxDisplayName") )
> Console.WriteLi ne("Size: {0}", queryObj("Size" ))
> Console.WriteLi ne("TotalItems : {0}",
> queryObj("Total Items"))
> 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******@netsc ape.net> wrote in message
> news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.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.Manageme nt, 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******@commu nity.nospam> wrote in message
news:OR******** ******@TK2MSFTN GP05.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******@netsc ape.net> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Already did that. Would posting a copy of my code help?
-----------------------------------------------------------------------
Dim search As New
ManagementObjec tSearcher("root \MicrosoftExcha ngeV2", _
"SELECT * FROM Exchange_Mailbo x WHERE
MailboxDisplayN ame = 'AR'")

Try
For Each objFound As ManagementObjec t In search.Get
txtStatus.Appen dText("MailboxD isplayName: " &
objFound("Mailb oxDisplayName") & vbTab & _
"Size : " & objFound("Size" )
& vbTab & _
"Total Items : " &
objFound("Total Items") & vbNewLine)
Next
txtStatus.Appen dText(vbNewLine & "Done.")
Catch ex As Exception
MsgBox("Error: " & ex.Message.ToSt ring & " in " &
ex.Source.ToStr ing)
End Try
-----------------------------------------------------------------------
I really do appreciate your help!
"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:O9******** ******@TK2MSFTN GP05.phx.gbl...
Add a reference to system.manageme nt

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******@netsc ape.net> wrote in message
news:uR******** ******@TK2MSFTN GP02.phx.gbl...
I'm getting "Invalid Namespace" from the System.Manageme nt namespace.
What am I not doing right?

"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:OH******** ******@TK2MSFTN GP03.phx.gbl...
> replace below with
>
> MsgBox(queryObj ("Size"))
>
> MsgBox(queryObj ("TotalItems "))
>
>
> replace this. I am sorry doing it on the fly.
>
> Console.WriteLi ne("MailboxDisp layName: {0}",
> queryObj("Mailb oxDisplayName") )
> Console.WriteLi ne("Size: {0}", queryObj("Size" ))
> Console.WriteLi ne("TotalItems : {0}",
> queryObj("Total Items"))
>
>
> --
> Get a powerful web, database, application, and email hosting with KJM
> Solutions
> http://www.kjmsolutions.com
>
>
>
> "vbnetdev" <vb******@commu nity.nospam> wrote in message
> news:uo******** ******@TK2MSFTN GP05.phx.gbl...
>> Imports System
>> Imports System.Manageme nt
>> Imports System.Windows. Forms
>>
>> Namespace VIKINGSSUCK
>>
>> Public Class THEPACKERSROCK
>>
>> Function HELPMENOW()
>>
>> Dim searcher As New ManagementObjec tSearcher( _
>> "root\Microsoft ExchangeV2", _
>> "SELECT * FROM Exchange_Mailbo x WHERE
>> MailboxDisplayN ame = 'Joe Schmo'")
>>
>> For Each queryObj As ManagementObjec t in
>> searcher.Get()
>> Console.WriteLi ne("MailboxDisp layName: {0}",
>> queryObj("Mailb oxDisplayName") )
>> Console.WriteLi ne("Size: {0}", queryObj("Size" ))
>> Console.WriteLi ne("TotalItems : {0}",
>> queryObj("Total Items"))
>> 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******@netsc ape.net> wrote in message
>> news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.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******@netsc ape.net> wrote in message
news:OQ******** ******@TK2MSFTN GP05.phx.gbl...
Yes, I did add a reference to System.Manageme nt, 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******@commu nity.nospam> wrote in message
news:OR******** ******@TK2MSFTN GP05.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******@netsc ape.net> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Already did that. Would posting a copy of my code help?
-----------------------------------------------------------------------
Dim search As New
ManagementObjec tSearcher("root \MicrosoftExcha ngeV2", _
"SELECT * FROM Exchange_Mailbo x WHERE
MailboxDisplayN ame = 'AR'")

Try
For Each objFound As ManagementObjec t In search.Get
txtStatus.Appen dText("MailboxD isplayName: " &
objFound("Mailb oxDisplayName") & vbTab & _
"Size : " &
objFound("Size" ) & vbTab & _
"Total Items : " &
objFound("Total Items") & vbNewLine)
Next
txtStatus.Appen dText(vbNewLine & "Done.")
Catch ex As Exception
MsgBox("Error: " & ex.Message.ToSt ring & " in " &
ex.Source.ToStr ing)
End Try
-----------------------------------------------------------------------
I really do appreciate your help!
"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:O9******** ******@TK2MSFTN GP05.phx.gbl...
Add a reference to system.manageme nt

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******@netsc ape.net> wrote in message
news:uR******** ******@TK2MSFTN GP02.phx.gbl...
> I'm getting "Invalid Namespace" from the System.Manageme nt namespace.
> What am I not doing right?
>
> "vbnetdev" <vb******@commu nity.nospam> wrote in message
> news:OH******** ******@TK2MSFTN GP03.phx.gbl...
>> replace below with
>>
>> MsgBox(queryObj ("Size"))
>>
>> MsgBox(queryObj ("TotalItems "))
>>
>>
>> replace this. I am sorry doing it on the fly.
>>
>> Console.WriteLi ne("MailboxDisp layName: {0}",
>> queryObj("Mailb oxDisplayName") )
>> Console.WriteLi ne("Size: {0}", queryObj("Size" ))
>> Console.WriteLi ne("TotalItems : {0}",
>> queryObj("Total Items"))
>>
>>
>> --
>> Get a powerful web, database, application, and email hosting with KJM
>> Solutions
>> http://www.kjmsolutions.com
>>
>>
>>
>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>> news:uo******** ******@TK2MSFTN GP05.phx.gbl...
>>> Imports System
>>> Imports System.Manageme nt
>>> Imports System.Windows. Forms
>>>
>>> Namespace VIKINGSSUCK
>>>
>>> Public Class THEPACKERSROCK
>>>
>>> Function HELPMENOW()
>>>
>>> Dim searcher As New ManagementObjec tSearcher( _
>>> "root\Microsoft ExchangeV2", _
>>> "SELECT * FROM Exchange_Mailbo x WHERE
>>> MailboxDisplayN ame = 'Joe Schmo'")
>>>
>>> For Each queryObj As ManagementObjec t in
>>> searcher.Get()
>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>> queryObj("Mailb oxDisplayName") )
>>> Console.WriteLi ne("Size: {0}", queryObj("Size" ))
>>> Console.WriteLi ne("TotalItems : {0}",
>>> queryObj("Total Items"))
>>> 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******@netsc ape.net> wrote in message
>>> news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.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******@commu nity.nospam> wrote in message
news:eu******** ********@TK2MSF TNGP04.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******@netsc ape.net> wrote in message
news:OQ******** ******@TK2MSFTN GP05.phx.gbl...
Yes, I did add a reference to System.Manageme nt, 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******@commu nity.nospam> wrote in message
news:OR******** ******@TK2MSFTN GP05.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******@netsc ape.net> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Already did that. Would posting a copy of my code help?
-----------------------------------------------------------------------
Dim search As New
ManagementObjec tSearcher("root \MicrosoftExcha ngeV2", _
"SELECT * FROM Exchange_Mailbo x WHERE
MailboxDisplayN ame = 'AR'")

Try
For Each objFound As ManagementObjec t In search.Get
txtStatus.Appen dText("MailboxD isplayName: " &
objFound("Mailb oxDisplayName") & vbTab & _
"Size : " &
objFound("Size" ) & vbTab & _
"Total Items : " &
objFound("Total Items") & vbNewLine)
Next
txtStatus.Appen dText(vbNewLine & "Done.")
Catch ex As Exception
MsgBox("Error: " & ex.Message.ToSt ring & " in " &
ex.Source.ToStr ing)
End Try
-----------------------------------------------------------------------
I really do appreciate your help!
"vbnetdev" <vb******@commu nity.nospam> wrote in message
news:O9******** ******@TK2MSFTN GP05.phx.gbl...
> Add a reference to system.manageme nt
>
> 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******@netsc ape.net> wrote in message
> news:uR******** ******@TK2MSFTN GP02.phx.gbl...
>> I'm getting "Invalid Namespace" from the System.Manageme nt namespace.
>> What am I not doing right?
>>
>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>> news:OH******** ******@TK2MSFTN GP03.phx.gbl...
>>> replace below with
>>>
>>> MsgBox(queryObj ("Size"))
>>>
>>> MsgBox(queryObj ("TotalItems "))
>>>
>>>
>>> replace this. I am sorry doing it on the fly.
>>>
>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>> queryObj("Mailb oxDisplayName") )
>>> Console.WriteLi ne("Size: {0}", queryObj("Size" ))
>>> Console.WriteLi ne("TotalItems : {0}",
>>> queryObj("Total Items"))
>>>
>>>
>>> --
>>> Get a powerful web, database, application, and email hosting with
>>> KJM Solutions
>>> http://www.kjmsolutions.com
>>>
>>>
>>>
>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>> news:uo******** ******@TK2MSFTN GP05.phx.gbl...
>>>> Imports System
>>>> Imports System.Manageme nt
>>>> Imports System.Windows. Forms
>>>>
>>>> Namespace VIKINGSSUCK
>>>>
>>>> Public Class THEPACKERSROCK
>>>>
>>>> Function HELPMENOW()
>>>>
>>>> Dim searcher As New ManagementObjec tSearcher( _
>>>> "root\Microsoft ExchangeV2", _
>>>> "SELECT * FROM Exchange_Mailbo x WHERE
>>>> MailboxDisplayN ame = 'Joe Schmo'")
>>>>
>>>> For Each queryObj As ManagementObjec t in
>>>> searcher.Get()
>>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>>> queryObj("Mailb oxDisplayName") )
>>>> Console.WriteLi ne("Size: {0}", queryObj("Size" ))
>>>> Console.WriteLi ne("TotalItems : {0}",
>>>> queryObj("Total Items"))
>>>> 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******@netsc ape.net> wrote in message
>>>> news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.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******@netsc ape.net> wrote in message
news:ed******** ******@TK2MSFTN GP04.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******@commu nity.nospam> wrote in message
news:eu******** ********@TK2MSF TNGP04.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******@netsc ape.net> wrote in message
news:OQ******** ******@TK2MSFTN GP05.phx.gbl...
Yes, I did add a reference to System.Manageme nt, 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******@commu nity.nospam> wrote in message
news:OR******** ******@TK2MSFTN GP05.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******@netsc ape.net> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
> Already did that. Would posting a copy of my code help?
> -----------------------------------------------------------------------
> Dim search As New
> ManagementObjec tSearcher("root \MicrosoftExcha ngeV2", _
> "SELECT * FROM Exchange_Mailbo x WHERE
> MailboxDisplayN ame = 'AR'")
>
> Try
> For Each objFound As ManagementObjec t In search.Get
> txtStatus.Appen dText("MailboxD isplayName: " &
> objFound("Mailb oxDisplayName") & vbTab & _
> "Size : " &
> objFound("Size" ) & vbTab & _
> "Total Items : " &
> objFound("Total Items") & vbNewLine)
> Next
> txtStatus.Appen dText(vbNewLine & "Done.")
> Catch ex As Exception
> MsgBox("Error: " & ex.Message.ToSt ring & " in " &
> ex.Source.ToStr ing)
> End Try
> -----------------------------------------------------------------------
> I really do appreciate your help!
>
>
> "vbnetdev" <vb******@commu nity.nospam> wrote in message
> news:O9******** ******@TK2MSFTN GP05.phx.gbl...
>> Add a reference to system.manageme nt
>>
>> 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******@netsc ape.net> wrote in message
>> news:uR******** ******@TK2MSFTN GP02.phx.gbl...
>>> I'm getting "Invalid Namespace" from the System.Manageme nt
>>> namespace. What am I not doing right?
>>>
>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>> news:OH******** ******@TK2MSFTN GP03.phx.gbl...
>>>> replace below with
>>>>
>>>> MsgBox(queryObj ("Size"))
>>>>
>>>> MsgBox(queryObj ("TotalItems "))
>>>>
>>>>
>>>> replace this. I am sorry doing it on the fly.
>>>>
>>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>>> queryObj("Mailb oxDisplayName") )
>>>> Console.WriteLi ne("Size: {0}", queryObj("Size" ))
>>>> Console.WriteLi ne("TotalItems : {0}",
>>>> queryObj("Total Items"))
>>>>
>>>>
>>>> --
>>>> Get a powerful web, database, application, and email hosting with
>>>> KJM Solutions
>>>> http://www.kjmsolutions.com
>>>>
>>>>
>>>>
>>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>>> news:uo******** ******@TK2MSFTN GP05.phx.gbl...
>>>>> Imports System
>>>>> Imports System.Manageme nt
>>>>> Imports System.Windows. Forms
>>>>>
>>>>> Namespace VIKINGSSUCK
>>>>>
>>>>> Public Class THEPACKERSROCK
>>>>>
>>>>> Function HELPMENOW()
>>>>>
>>>>> Dim searcher As New ManagementObjec tSearcher( _
>>>>> "root\Microsoft ExchangeV2", _
>>>>> "SELECT * FROM Exchange_Mailbo x WHERE
>>>>> MailboxDisplayN ame = 'Joe Schmo'")
>>>>>
>>>>> For Each queryObj As ManagementObjec t in
>>>>> searcher.Get()
>>>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>>>> queryObj("Mailb oxDisplayName") )
>>>>> Console.WriteLi ne("Size: {0}",
>>>>> queryObj("Size" ))
>>>>> Console.WriteLi ne("TotalItems : {0}",
>>>>> queryObj("Total Items"))
>>>>> 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******@netsc ape.net> wrote in message
>>>>> news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.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******@commu nity.nospam> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
No.

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

"Bryan Dickerson" <tx******@netsc ape.net> wrote in message
news:ed******** ******@TK2MSFTN GP04.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******@commu nity.nospam> wrote in message
news:eu******** ********@TK2MSF TNGP04.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******@netsc ape.net> wrote in message
news:OQ******** ******@TK2MSFTN GP05.phx.gbl...
Yes, I did add a reference to System.Manageme nt, 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******@commu nity.nospam> wrote in message
news:OR******** ******@TK2MSFTN GP05.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******@netsc ape.net> wrote in message
> news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>> Already did that. Would posting a copy of my code help?
>> -----------------------------------------------------------------------
>> Dim search As New
>> ManagementObjec tSearcher("root \MicrosoftExcha ngeV2", _
>> "SELECT * FROM Exchange_Mailbo x WHERE
>> MailboxDisplayN ame = 'AR'")
>>
>> Try
>> For Each objFound As ManagementObjec t In search.Get
>> txtStatus.Appen dText("MailboxD isplayName: " &
>> objFound("Mailb oxDisplayName") & vbTab & _
>> "Size : " &
>> objFound("Size" ) & vbTab & _
>> "Total Items : " &
>> objFound("Total Items") & vbNewLine)
>> Next
>> txtStatus.Appen dText(vbNewLine & "Done.")
>> Catch ex As Exception
>> MsgBox("Error: " & ex.Message.ToSt ring & " in " &
>> ex.Source.ToStr ing)
>> End Try
>> -----------------------------------------------------------------------
>> I really do appreciate your help!
>>
>>
>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>> news:O9******** ******@TK2MSFTN GP05.phx.gbl...
>>> Add a reference to system.manageme nt
>>>
>>> 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******@netsc ape.net> wrote in message
>>> news:uR******** ******@TK2MSFTN GP02.phx.gbl...
>>>> I'm getting "Invalid Namespace" from the System.Manageme nt
>>>> namespace. What am I not doing right?
>>>>
>>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>>> news:OH******** ******@TK2MSFTN GP03.phx.gbl...
>>>>> replace below with
>>>>>
>>>>> MsgBox(queryObj ("Size"))
>>>>>
>>>>> MsgBox(queryObj ("TotalItems "))
>>>>>
>>>>>
>>>>> replace this. I am sorry doing it on the fly.
>>>>>
>>>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>>>> queryObj("Mailb oxDisplayName") )
>>>>> Console.WriteLi ne("Size: {0}",
>>>>> queryObj("Size" ))
>>>>> Console.WriteLi ne("TotalItems : {0}",
>>>>> queryObj("Total Items"))
>>>>>
>>>>>
>>>>> --
>>>>> Get a powerful web, database, application, and email hosting with
>>>>> KJM Solutions
>>>>> http://www.kjmsolutions.com
>>>>>
>>>>>
>>>>>
>>>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>>>> news:uo******** ******@TK2MSFTN GP05.phx.gbl...
>>>>>> Imports System
>>>>>> Imports System.Manageme nt
>>>>>> Imports System.Windows. Forms
>>>>>>
>>>>>> Namespace VIKINGSSUCK
>>>>>>
>>>>>> Public Class THEPACKERSROCK
>>>>>>
>>>>>> Function HELPMENOW()
>>>>>>
>>>>>> Dim searcher As New
>>>>>> ManagementObjec tSearcher( _
>>>>>> "root\Microsoft ExchangeV2", _
>>>>>> "SELECT * FROM Exchange_Mailbo x WHERE
>>>>>> MailboxDisplayN ame = 'Joe Schmo'")
>>>>>>
>>>>>> For Each queryObj As ManagementObjec t in
>>>>>> searcher.Get()
>>>>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>>>>> queryObj("Mailb oxDisplayName") )
>>>>>> Console.WriteLi ne("Size: {0}",
>>>>>> queryObj("Size" ))
>>>>>> Console.WriteLi ne("TotalItems : {0}",
>>>>>> queryObj("Total Items"))
>>>>>> 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******@netsc ape.net> wrote in message
>>>>>> news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.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******@netsc ape.net> wrote in message
news:e1******** ******@TK2MSFTN GP03.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******@commu nity.nospam> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
No.

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

"Bryan Dickerson" <tx******@netsc ape.net> wrote in message
news:ed******** ******@TK2MSFTN GP04.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******@commu nity.nospam> wrote in message
news:eu******** ********@TK2MSF TNGP04.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******@netsc ape.net> wrote in message
news:OQ******** ******@TK2MSFTN GP05.phx.gbl...
> Yes, I did add a reference to System.Manageme nt, 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******@commu nity.nospam> wrote in message
> news:OR******** ******@TK2MSFTN GP05.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******@netsc ape.net> wrote in message
>> news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>>> Already did that. Would posting a copy of my code help?
>>> -----------------------------------------------------------------------
>>> Dim search As New
>>> ManagementObjec tSearcher("root \MicrosoftExcha ngeV2", _
>>> "SELECT * FROM Exchange_Mailbo x WHERE
>>> MailboxDisplayN ame = 'AR'")
>>>
>>> Try
>>> For Each objFound As ManagementObjec t In search.Get
>>> txtStatus.Appen dText("MailboxD isplayName: " &
>>> objFound("Mailb oxDisplayName") & vbTab & _
>>> "Size : " &
>>> objFound("Size" ) & vbTab & _
>>> "Total Items : " &
>>> objFound("Total Items") & vbNewLine)
>>> Next
>>> txtStatus.Appen dText(vbNewLine & "Done.")
>>> Catch ex As Exception
>>> MsgBox("Error: " & ex.Message.ToSt ring & " in " &
>>> ex.Source.ToStr ing)
>>> End Try
>>> -----------------------------------------------------------------------
>>> I really do appreciate your help!
>>>
>>>
>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>> news:O9******** ******@TK2MSFTN GP05.phx.gbl...
>>>> Add a reference to system.manageme nt
>>>>
>>>> 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******@netsc ape.net> wrote in message
>>>> news:uR******** ******@TK2MSFTN GP02.phx.gbl...
>>>>> I'm getting "Invalid Namespace" from the System.Manageme nt
>>>>> namespace. What am I not doing right?
>>>>>
>>>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>>>> news:OH******** ******@TK2MSFTN GP03.phx.gbl...
>>>>>> replace below with
>>>>>>
>>>>>> MsgBox(queryObj ("Size"))
>>>>>>
>>>>>> MsgBox(queryObj ("TotalItems "))
>>>>>>
>>>>>>
>>>>>> replace this. I am sorry doing it on the fly.
>>>>>>
>>>>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>>>>> queryObj("Mailb oxDisplayName") )
>>>>>> Console.WriteLi ne("Size: {0}",
>>>>>> queryObj("Size" ))
>>>>>> Console.WriteLi ne("TotalItems : {0}",
>>>>>> queryObj("Total Items"))
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Get a powerful web, database, application, and email hosting with
>>>>>> KJM Solutions
>>>>>> http://www.kjmsolutions.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>>>>> news:uo******** ******@TK2MSFTN GP05.phx.gbl...
>>>>>>> Imports System
>>>>>>> Imports System.Manageme nt
>>>>>>> Imports System.Windows. Forms
>>>>>>>
>>>>>>> Namespace VIKINGSSUCK
>>>>>>>
>>>>>>> Public Class THEPACKERSROCK
>>>>>>>
>>>>>>> Function HELPMENOW()
>>>>>>>
>>>>>>> Dim searcher As New
>>>>>>> ManagementObjec tSearcher( _
>>>>>>> "root\Microsoft ExchangeV2", _
>>>>>>> "SELECT * FROM Exchange_Mailbo x WHERE
>>>>>>> MailboxDisplayN ame = 'Joe Schmo'")
>>>>>>>
>>>>>>> For Each queryObj As ManagementObjec t in
>>>>>>> searcher.Get()
>>>>>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>>>>>> queryObj("Mailb oxDisplayName") )
>>>>>>> Console.WriteLi ne("Size: {0}",
>>>>>>> queryObj("Size" ))
>>>>>>> Console.WriteLi ne("TotalItems : {0}",
>>>>>>> queryObj("Total Items"))
>>>>>>> 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******@netsc ape.net> wrote in message
>>>>>>> news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.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******@netsc ape.net> wrote in message
news:ea******** ******@TK2MSFTN GP04.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******@netsc ape.net> wrote in message
news:e1******** ******@TK2MSFTN GP03.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******@commu nity.nospam> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
No.

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

"Bryan Dickerson" <tx******@netsc ape.net> wrote in message
news:ed******** ******@TK2MSFTN GP04.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******@commu nity.nospam> wrote in message
news:eu******** ********@TK2MSF TNGP04.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******@netsc ape.net> wrote in message
> news:OQ******** ******@TK2MSFTN GP05.phx.gbl...
>> Yes, I did add a reference to System.Manageme nt, 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******@commu nity.nospam> wrote in message
>> news:OR******** ******@TK2MSFTN GP05.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******@netsc ape.net> wrote in message
>>> news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>>>> Already did that. Would posting a copy of my code help?
>>>> -----------------------------------------------------------------------
>>>> Dim search As New
>>>> ManagementObjec tSearcher("root \MicrosoftExcha ngeV2", _
>>>> "SELECT * FROM Exchange_Mailbo x WHERE
>>>> MailboxDisplayN ame = 'AR'")
>>>>
>>>> Try
>>>> For Each objFound As ManagementObjec t In search.Get
>>>> txtStatus.Appen dText("MailboxD isplayName: " &
>>>> objFound("Mailb oxDisplayName") & vbTab & _
>>>> "Size : " &
>>>> objFound("Size" ) & vbTab & _
>>>> "Total Items : " &
>>>> objFound("Total Items") & vbNewLine)
>>>> Next
>>>> txtStatus.Appen dText(vbNewLine & "Done.")
>>>> Catch ex As Exception
>>>> MsgBox("Error: " & ex.Message.ToSt ring & " in " &
>>>> ex.Source.ToStr ing)
>>>> End Try
>>>> -----------------------------------------------------------------------
>>>> I really do appreciate your help!
>>>>
>>>>
>>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>>> news:O9******** ******@TK2MSFTN GP05.phx.gbl...
>>>>> Add a reference to system.manageme nt
>>>>>
>>>>> 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******@netsc ape.net> wrote in message
>>>>> news:uR******** ******@TK2MSFTN GP02.phx.gbl...
>>>>>> I'm getting "Invalid Namespace" from the System.Manageme nt
>>>>>> namespace. What am I not doing right?
>>>>>>
>>>>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>>>>> news:OH******** ******@TK2MSFTN GP03.phx.gbl...
>>>>>>> replace below with
>>>>>>>
>>>>>>> MsgBox(queryObj ("Size"))
>>>>>>>
>>>>>>> MsgBox(queryObj ("TotalItems "))
>>>>>>>
>>>>>>>
>>>>>>> replace this. I am sorry doing it on the fly.
>>>>>>>
>>>>>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>>>>>> queryObj("Mailb oxDisplayName") )
>>>>>>> Console.WriteLi ne("Size: {0}",
>>>>>>> queryObj("Size" ))
>>>>>>> Console.WriteLi ne("TotalItems : {0}",
>>>>>>> queryObj("Total Items"))
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Get a powerful web, database, application, and email hosting
>>>>>>> with KJM Solutions
>>>>>>> http://www.kjmsolutions.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> "vbnetdev" <vb******@commu nity.nospam> wrote in message
>>>>>>> news:uo******** ******@TK2MSFTN GP05.phx.gbl...
>>>>>>>> Imports System
>>>>>>>> Imports System.Manageme nt
>>>>>>>> Imports System.Windows. Forms
>>>>>>>>
>>>>>>>> Namespace VIKINGSSUCK
>>>>>>>>
>>>>>>>> Public Class THEPACKERSROCK
>>>>>>>>
>>>>>>>> Function HELPMENOW()
>>>>>>>>
>>>>>>>> Dim searcher As New
>>>>>>>> ManagementObjec tSearcher( _
>>>>>>>> "root\Microsoft ExchangeV2", _
>>>>>>>> "SELECT * FROM Exchange_Mailbo x WHERE
>>>>>>>> MailboxDisplayN ame = 'Joe Schmo'")
>>>>>>>>
>>>>>>>> For Each queryObj As ManagementObjec t in
>>>>>>>> searcher.Get()
>>>>>>>> Console.WriteLi ne("MailboxDisp layName: {0}",
>>>>>>>> queryObj("Mailb oxDisplayName") )
>>>>>>>> Console.WriteLi ne("Size: {0}",
>>>>>>>> queryObj("Size" ))
>>>>>>>> Console.WriteLi ne("TotalItems : {0}",
>>>>>>>> queryObj("Total Items"))
>>>>>>>> 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******@netsc ape.net> wrote in message
>>>>>>>> news:OE******** ******@TK2MSFTN GP03.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.goo glegroups.com.. .
>>>>>>>>> > Perhaps this will help:
>>>>>>>>> >
>>>>>>>>> > http://msdn.microsoft.com/library/de...un03282003.asp
>>>>>>>>> >
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



May 10 '06 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
13206
by: Seshadri | last post by:
Greetings, I am using C# to write a windows service that will periodically scan the exchange server for emails,fetch them, process the information in the emails and flag them after processing. I would appreciate if anyone reading this post can point me to some code that will read emails from an Exchange server please. Also, most of the help on the support on the MSDN site is making use of CDO for Exchange server. I am developing on...
62
10345
by: Bryan Dickerson | last post by:
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...
14
9914
by: sridhar | last post by:
iam having user account on an exchangeserver. with that can i send an email using python? if iam using the following code iam getting error fromAddress = 'sridhar_kasturi@satyam.com' toAddress = 'sridhar_kasturi@satyam.com' msg = "Subject: Hello\n\nThis is the body of the message." import smtplib
0
1688
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, My company will be hosting a webcast, and I need to send out 2000 individual emails to people who signed up (for login information...). I created an smtp app that I can loop through which uses smtp and our Exchange mail server. The smtp app works fine. I tested it on 10 test emails and called Client.Send 10 times. The emails went through (I emailed myself). My question is if anyone knows if Exchange server would be bogged...
0
9997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9845
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11279
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10870
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5893
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4306
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.