Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Getting Computer Information

Posted on 2006-04-10
15
Medium Priority
?
162 Views
Last Modified: 2011-09-20
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
0
Comment
Question by:narmi2
  • 7
  • 6
  • 2
15 Comments
 
LVL 1

Author Comment

by:narmi2
ID: 16415737
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16417623
Did you see that last post, in that question, by graye?

Bob
0
 
LVL 1

Author Comment

by:narmi2
ID: 16424784
Yes, I have seen it but can't seem to get it to work?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 41

Expert Comment

by:graye
ID: 16425590
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16425663
What version of .NET do you have?

Bob
0
 
LVL 1

Author Comment

by:narmi2
ID: 16426089
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
 
LVL 41

Expert Comment

by:graye
ID: 16427687
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
 
LVL 41

Expert Comment

by:graye
ID: 16427753
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
 
LVL 1

Author Comment

by:narmi2
ID: 16428641
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
 
LVL 41

Expert Comment

by:graye
ID: 16431999
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
 
LVL 41

Accepted Solution

by:
graye earned 2000 total points
ID: 16432159
oops....  that should have read "member of the Domain Admin group"
0
 
LVL 1

Author Comment

by:narmi2
ID: 16486187
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
 
LVL 41

Expert Comment

by:graye
ID: 16486467
I dunno...

Is the value of the DefaultDomain.Text in the configuration file set correctly?
0
 
LVL 1

Author Comment

by:narmi2
ID: 16499746
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
 
LVL 41

Expert Comment

by:graye
ID: 16504616
email is fine...  ExpertSexChange wasn't really meant for "product support"
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question