Windows – Query for computers on a domain that are online

networkingwindows

Where I work we use a piece of software called Dameware to remotely manage computers on our domain. Through Dameware we are able to get a list of all of the computers that are online and currently connected to the domain.

We are in the process of rolling out new desktop management software that does not provide this feature to us. We need to know the name of a computer when we want to connect to it.

I know how to get a list of the computers that belong to the domain but that also returns computers that may or may not be online. How do I return a list of computers that are currently connected (ie. they have an active network connection) to the domain? I thought about returning a list of computers that belong to the domain and then pinging each one but I think that would be slow and a complete waste of resources.

Have you run in to this problem before and if so, what solutions have worked for you? I would prefer a .NET solution but VB script will work as well. I may end up building a GUI for this that I would distribute to members of our IT team.

Best Answer

If you watch the outbound traffic from DameWare, it just snags all the computer objects from AD and then tries to connect to them via their hostname using NETBIOS.

Thats extremely simple to re-create, no magic involved.