• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1910
  • Last Modified:

Need to find computer names on LAN

Hello

I have set up a domain at my house on a windows 2003 domain controller.  I have 6 other computers running XP attached to this domain controller through a cisco switch, able to ping back and forth to each pc from any pc on domain

Here is my question.  Is there a dos command that I can run on any computer that will show me the individual computer names of all the PC's attached to the domain?
0
scottatadt
Asked:
scottatadt
  • 11
  • 6
  • 6
  • +4
19 Solutions
 
RPPreacherCommented:
ping -a assuming you know IP addresses.

ping -a <ip address>
0
 
scottatadtAuthor Commented:
No,

Let's pretend we know absolutely nothing about any of the other computers, as well as not know any IP Addresses included.
0
 
RPPreacherCommented:
create a loop and ping all IPs on subnet using ping -a
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
scottatadtAuthor Commented:
No,

Let's pretend we know absolutely nothing about any of the other computers, as well as not know any IP Addresses included.
0
 
RPPreacherCommented:
or net view /domain:<domain name>
0
 
scottatadtAuthor Commented:
or net view /domain:<domain name>

That doesn't work.  Already tried this with multiple combinations over and over.
0
 
sirbountyCommented:
net view
by itself should show you...works on my home domain...
0
 
scottatadtAuthor Commented:
Well unfortunately it doesn't work for  me., so do you have any more ideas?  Is there another command or sequence of commands that I can try to accomplish my goal?

From any pc, I want to be able to run a command or a few commands to determine the names of the computers on my domain.  This cannot be impossible.
0
 
RPPreacherCommented:
Then no.  There is no DOS command.  If you can't get net view to work and can't ping 6 computers, you are stuck.
0
 
RPPreacherCommented:
It's not impossible.  It's net view or ping -a, but you said that doesn't work.  So not impossible...
0
 
scottatadtAuthor Commented:
Anybody else have any suggestions?
0
 
ShmoidCommented:
You said net view does not work. Do you get an error message?

Don't use any parameters just type

NET VIEW

Nothing else. Report back any error you get.
0
 
joolsCommented:
try `nbtstat -n`

I think there is another command but I'm racking my brain at the moment....
0
 
sirbountyCommented:
Wait a minute - are they all joined to the domain?
0
 
ShmoidCommented:
sirbounty, that's exactly what I was thinking. He says, "attached to this domain controller through a cisco switch" but doesn't mention joining the domain. That's why I asked if he was getting any error messages when issuing net view. I was betting he would get a system error 6118 or similar indicating the PC's were still in a workgroup.

jools, nbtstat -n will only show names that have been registered locally on the system by NetBIOS applications. It would not show all other PC's in the domain. If he pinged all PC's then issued nbtstat -c it would show all cached names but that defeats his purpose.
So scottatadt, any error messages?
0
 
Darr247Commented:
Do you have a WINS server setup?
0
 
joolsCommented:
I was hoping there would be some more errors.

Alas the other utility I was thinking about was smbtree, I guess I was in linux mode...
0
 
scottatadtAuthor Commented:
It seems that just running net view by itself will show the computers attached to the domain.  However, I didn't mention that I was looking for the individual IP addresses of all the PC's attached to the domain as well - all of this with a command or set of commands.  I appologize for not being clear.

0
 
sirbountyCommented:
How about this...save as findPC.bat
@echo off
for /f %%a in ('net view^|find /i "\\"') do (
  set pc=%%a
  echo Locating %pc:~2%...
  for /f "tokens=3" %%r in ('ping %pc:~2% -n 1^|find /i "Pinging"') do (
    echo.  Found at %%r
  )
  echo.
)

Open in new window

0
 
Darr247Commented:
Do you have a WINS server setup?
0
 
RPPreacherCommented:
>I didn't mention that I was looking for the individual IP addresses of all the PC's

You should probably open another question thread for that.  Many experts have given you MANY solutions to your question.  It's bad form to keep "extending" the question.

...oh did I mention I needed the MAC addresses too?
...oh and the currently logged on user?
...oh and the color of the mouse...
0
 
sirbountyCommented:
I don't see an extension of the question - the asker wasn't getting a resolution from the posted suggestions, and once a solution was found to be working, just asked for associative reference (this 'returned PC' is located at 'this IP address').  Not too much to ask for a 500 point question, imho.

That said, if my last posted batch file works for you, you can save the output using this modification:
@echo off
set output=c:\results.txt
if exist %output% del /q %output%
for /f %%a in ('net view^|find /i "\\"') do (
  set pc=%%a
  echo Locating %pc:~2%... >> %output%
  for /f "tokens=3" %%r in ('ping %pc:~2% -n 1^|find /i "Pinging"') do (
    echo.  Found at %%r >> %output%
  )
  echo.
)

Open in new window

0
 
scottatadtAuthor Commented:
No Wins server is setup

Sorry for extending the question RPPreacher, your right it is bad form, but you don't have to add comments like-  ...oh and the color of the mouse...  --> That is bad form as well.  Besides I did appologize.

sirbounty - I will test this out as soon as I can.  Thanks.



0
 
scottatadtAuthor Commented:
Sirbounty

I tried that but it didn't work.
0
 
sirbountyCommented:
Anything in the output?
Try it without the first line and let's see what's happening...
REM @echo off
cls
set output=c:\results.txt
if exist %output% del /q %output%
for /f %%a in ('net view^|find /i "\\"') do (
  set pc=%%a
  echo PC is %pc:~2%
pause
  echo Locating %pc:~2%... >> %output%
  for /f "tokens=3" %%r in ('ping %pc:~2% -n 1^|find /i "Pinging"') do (
    echo.  Found at %%r >> %output%
pause
  )
  echo.
)

Open in new window

0
 
scottatadtAuthor Commented:
Tried it again, and it just pops up with a DOS screen and quickly goes away.  I will keep playing around with this file to see if I can get it right.
0
 
sirbountyCommented:
Start a cmd window first - then run it...

Start->Run->cmd <Enter>

Then change to the folder where it's been saved:
  cd \ yourfolder
and run it..
  yourscript.bat
0
 
AmazingTechCommented:
sirbounty,

I think you need to use SETLOCAL ENABLEDELAYEDEXPANSION
SETLOCAL ENABLEDELAYEDEXPANSION
REM @echo off
cls
set output=c:\results.txt
if exist %output% del /q %output%
for /f %%a in ('net view^|find /i "\\"') do (
  set pc=%%a
  echo PC is !pc:~2!
pause
  echo Locating !pc:~2!... >> %output%
  for /f "tokens=3" %%r in ('ping !pc:~2! -n 1^|find /i "Pinging"') do (
    echo.  Found at %%r >> %output%
pause
  )
  echo.
)

Open in new window

0
 
scottatadtAuthor Commented:
Good work guys, going to wrap this one up.  I have enough information now to conclude my experiment.  I want to thank each and everyone of you for your help and patience.  
0
 
scottatadtAuthor Commented:
Thanks again!
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 11
  • 6
  • 6
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now