Solved

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

Posted on 2006-11-02
1
143 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
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…

696 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