?
Solved

Scripting question, generate report of machines showing which domain they are joined to

Posted on 2006-11-02
1
Medium Priority
?
144 Views
Last Modified: 2010-03-18
I need to script or otherwise automate a report through vbscript or batch file, to scan a particular IP range and report on machine name and which domain the machine is joined to.  I am sure windows has some dos utilities that will accomplish this, so if anyone has a good  script example you could send me, I'd appreciate it.

Thanks
Joe
0
Comment
Question by:MCPJoe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 43

Accepted Solution

by:
Steve Knight earned 2000 total points
ID: 17858170
nbtstat will report that:  nbtstat -a hostname, i.e. with a list of hosts in hostlist.txt, one per line something like this should run down the list then extract the domain name from the nbtstat output.  Can't test here at the mo. so report back any syntax errors or if it doesn't work for you.
Steve

@echo off
for /f "tokens=*" %%a in (hostlist.txt) do call :process %%a
goto end
:process

for /f "tokens=1" %%x in ('nbtstat -a %1 ^| find "<1F>"') do echo %1, %%x >> domlist.txt
:end
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question