Getting Computer Information

Hi

Continuing from http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21805843.html

I can now get a list of all computer on the network, but how do I get more information by "probing" each computer as it was suggested in the list above?

Thanks
LVL 1
narmi2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

narmi2Author Commented:
Here is the current code I am using just to get a list of all computers on the network:

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

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

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

Next

Catch e As Exception

Console.WriteLine(e.ToString)

End Try
0
Bob LearnedCommented:
Did you see that last post, in that question, by graye?

Bob
0
narmi2Author Commented:
Yes, I have seen it but can't seem to get it to work?
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

grayeCommented:
What kind of problems are you having with SOSOS?

...just to make sure I didn't mess anything up (Hey, anything can happen), I went to my own web site, downloaded the source, unziped it, lauched Visual Studio, and compiled it.  Everything works.
0
Bob LearnedCommented:
What version of .NET do you have?

Bob
0
narmi2Author Commented:
I have .NET 1.1 - VS.NET 2003.

The program compiles and everything!  When I click the "Do it!" button if gives me information about my own computer.

When I click on Admin > Poll Remote PCs > Poll by Domain Name.

I type in the domain name and select "By WinNT Domain"

It says "Getting list of PCs..."

After a VERY long wait it says that it found 2 PCs when there are about 200 on the network?  Also, it did not display the information it found about those 2 PCs?

I'm not too sure what the problem is.

Thanks
0
grayeCommented:
Let's talk about those choices for polling...

Network Browse List - Useful when you're on a workgroup (rather than a domain) or when you really just want only those PCs that you can see in the "My Network Places" (without regard to the domain/workgroup).

WinNT Domain - Useful when you're using the old-style Win NT 4.0 domain.   Also works with newer Win 2000 domains, but lacks a lot of additional functionality.

Active Directory Domain - Useful when you're using the an "Active Directory"-style domain on Win 2000/Win 2003.  Allows for additional filtering by OU.

Let's also talk about what you'd expect to see...

Unlike polling a single PC, when polling a group a PCs, you won't get a window showing the results of the poll for each of those PCs.   Instead the information is quietly placed into the database.   Afterwards, you go look in the database to see what data has been collected.

Let's talk about configuration issues...

To remotely poll, you need appropriate permissions on each of the remote PCs.  Typically that'd be easy if you ran the program as a member of the Domain Administrators group.

It could be that your network has been configured to not allow this kind of probing...  For example, each PC might have a software-based firewall installed or the DCOM services stopped.

More info...

If the delay is in "Getting the list of PCs", then I'd suggest that you use one of the other polling techniques.
I'd also suggest that you turn on the "logging feature" to get a text-based log of what is going on.  It will record the errors that flash on the screen for a new seconds.
0
grayeCommented:
By the way... I've got 75,000 PCs in my domain (no, I'm not kidding), and when I use the WinNT method or AD (without an OU filter), it takes about 2 minutes to build the list of PCs to poll.

However it takes about 15-20 seconds to run poll for each PC, so a reasonable number of PCs to pick when polling is in the 200-300 range.  That takes about an hour and half to complete on my network.
0
narmi2Author Commented:
Thanks

For some reason when I run the program the "admin" menu is grayed out.  If I run it from within vs.net I can select from the "admin" menu ???

Also

All the options except WinNT Domain say "bad domain" or something like that.  When I select WinNT Domain it is able to COUNT the number of PCs but gives an error message when it gets to PC 7 ???

Any ideas?
0
grayeCommented:
The fact that you don't get the Admin menu is a good clue... that menu is only activated if you're a member of the Local Administrator's group.

That also probably explains why you can't get information from the remote PCs.

I suspect the problems you're having are all related to the fact that you don't have the proper credentials
0
grayeCommented:
oops....  that should have read "member of the Domain Admin group"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
narmi2Author Commented:
I've just had it arranged and I am now a member of the Domain Admins group.

I tested it with the following code which returned "TRUE"

        Dim objWindowsIdentity As WindowsIdentity
        Dim objWindowsPrincipal As WindowsPrincipal

        objWindowsIdentity = WindowsIdentity.GetCurrent()
        objWindowsPrincipal = New WindowsPrincipal(objWindowsIdentity)

        Label1.Text = objWindowsPrincipal.IsInRole("DOMAIN\Domain Admins").ToString

So if this is saying, yes I am a domain admin, why is the admin menu in sosos still grayed out?

Please help
0
grayeCommented:
I dunno...

Is the value of the DefaultDomain.Text in the configuration file set correctly?
0
narmi2Author Commented:
Ok, its fixed, I just had myself removed and domain admin then reinstated again and bingo!!!???

graye, I have some questions about sosos, is it ok if I email you or is it best if I post the questions in separate thread in experts-exchange?

Thanks
0
grayeCommented:
email is fine...  ExpertSexChange wasn't really meant for "product support"
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.