Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-02
1
Medium Priority
?
145 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
An article on effective troubleshooting
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

618 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