Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Detecting machines on a network

2 views
Skip to first unread message

a

unread,
May 7, 2003, 8:00:57 AM5/7/03
to
Hi,

Does anybody know of a way of detecting machines on a network and
retrieving their names and ip addresses?

Any help would be appreciated!

Thanks in advance,

AJB

Ken Tucker

unread,
May 7, 2003, 11:30:40 AM5/7/03
to
Hi,

The directorysearcher class can retrieve the computer names from an
active directory. Add a reference to system.directoryservices.dll.

Dim de As New System.DirectoryServices.DirectoryEntry("LDAP://domain name")

Dim ds As New System.DirectoryServices.DirectorySearcher(de)

Dim r As System.DirectoryServices.SearchResult

ds.Filter = "(objectClass=computer)"

Try

For Each r In ds.FindAll

Dim s As String

Console.WriteLine(r.GetDirectoryEntry.Name.ToString)

Next

Catch e As Exception

Console.WriteLine(e.ToString)

End Try

Ken
--------
"a" <a...@a.com> wrote in message
news:5athbvse3ru573m5i...@4ax.com...

a

unread,
May 7, 2003, 1:27:57 PM5/7/03
to
Thanks for your reply! Is there anyway of finding the machines on a
network without using Active Directory?

Thanks in advance,

AJB

On Wed, 7 May 2003 11:30:40 -0400, "Ken Tucker" <vb...@bellsouth.net>
wrote:

TheExtreme

unread,
May 7, 2003, 8:09:32 PM5/7/03
to
Use the NetServerEnum API


--
www.winmgmt.com
Gu...@WinMgmt.com


"a" <a...@a.com> wrote in message

news:eegibvoqr3pl69i16...@4ax.com...

hkw...@hotmail.com

unread,
May 7, 2003, 8:41:33 PM5/7/03
to

see reply to a message posted under subject

Re: find all servers of a local network

0 new messages