C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Active Directory »

Getting Names of Computers in WorkGroup


Posted Date: 03 Aug 2008    Resource Type: Code Snippets    Category: Active Directory
Author: Hefin DsouzaMember Level: Diamond    
Rating: 1 out of 5Points: 6



This code sample is used to get all the names of computers that are there in your network. The output is displayed in console. It uses the DirectoryEntry and DirectoryServices objects to accomplish this.


Sub Main()
Dim root As New DirectoryEntry("WinNT:")
Dim parent As DirectoryServices.DirectoryEntries
parent = root.Children
Dim d As DirectoryEntries = parent
For Each complist As DirectoryEntry In parent
For Each c As DirectoryEntry In complist.Children
If (c.Name <> "Schema") Then
Console.WriteLine(c.Name)
End If
Next
Next
End Sub


The Sample Provided with application that will allow you to understand more


Hefin Dosuza



Attachments

  • Download Source Code (20027-3540-ListNetworkComputers.rar)


  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Sign In to add tags.
    Getting computers in network  .  Get all computers in a Workgroup  .  Computers in a Workgroup  .  All nodes in a Workgroup  .  All computers in a Workgroup  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: Send a File to recycle bin on deletion
    Previous Resource: Reflact the user permissions in specified group in the local site instantly
    Return to Discussion Resource Index
    Post New Resource
    Category: Active Directory


    Post resources and earn money!
     
    More Resources



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use