Import a list of Windows computer names into a text file

Import Network Windows Hosts into a text file

2r4cksg78d

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.

Powered by Drupal, an open source content management system