Import a list of Windows computer names into a text file

If you wish to import all of the computers in a domain or workgroup displayed under the Windows Network into a text file there isn’t always an obvious way of doing it. However with a simple cmd prompt command you can get a listing of the machines registered in the domain. In my example I am going to output the computer names into a file called hostnames.txt

Obtain the listing

Open a command prompt Start->Run->cmd Type

net view > hostnames.txt

or if you wish to specify a particular domain

net view /domain:mydomain > hostnames.txt

The output of the domain will then be placed in file called hostnames.txt. You can manipulate this file in Notepad, Excel or any other program capable of editing ascii files.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: