[itdiscuss] Name/IP lookup

Glenn Kelley glenn at vinehosting.com
Thu Apr 2 17:32:38 EDT 2009


Sir - you are in all our prayers


On Apr 2, 2009, at 4:57 PM, Danny Ybarra wrote:

>
> Not the cleanest code.
> Also Disclaimer (I just took a Vicadin) just had surgery on my hand.
>
> Change this line below if you want to save to file
> @echo %%a %%c)
>
> To
>
> @echo %%a %%c > filename.txt)
>
>
>
>
>
> GetIP.bat
> --------------------------------------------
> @echo off
>
> setlocal
> set dom=%1
> if defined USERDNSDOMAIN if not defined dom set dom=%USERDOMAIN%
> if not defined dom goto :err1
> for /f "Tokens=1 delims=^\," %%g in ('net view /domain:%dom% ^| 
> Findstr /L /C:"\\"') do (
>  for /f "Tokens=1" %%a in ('@echo %%g') do (
>  FOR /F "tokens=2,3 delims= " %%b IN ('PING -n 1 %%a ^| find  
> "Reply"') DO (
> @echo %%a %%c)
> )
> )
> endlocal
> goto :EOF
> :err1
> @echo NetViewC - a NetBIOS domain name parameter is required because  
> you are logged on locally to %USERDOMAIN%.
> endlocal
>
>
>
>
>
>
>
>
>
>
>
>
> Danny Ybarra
> Viant Solutions
> 678-358-4603
>
> From: discuss-bounces at itdiscuss.org [mailto:discuss-bounces at itdiscuss.org 
> ] On Behalf Of Tony Dye
> Sent: Thursday, April 02, 2009 4:11 PM
> To: Discuss
> Subject: [itdiscuss] Name/IP lookup
>
> I’m sure I used to know how to do this, and now my mind is blank.   
> (yeah, go ahead and insert your insult/joke here).  I can do a
>                 net view /DOMAIN:name
> to get a list of all the machines (at least the Windows one) on a  
> network.
>
> What’s an easy way to get the IP addresses to go with that list.   
> Caveat, have to work in Windows, no *nix system available.  Also  
> unwilling to pay for a utility for this.
>
> Any easy answers?
>
>
>
> --
> Tony Dye
> Blog: http://tonydye.net
> Find me on LinkedIn: http://www.linkedin.com/in/tonydyev2
>
> _______________________________________________
> it discuss mailing list: discuss at itdiscuss.org
> Mailing List: http://itdiscuss.org/discuss
> Web Discussion Board: http://itdiscuss.org/discuss-forum
> Wiki: http://itdiscuss.org/wiki
> Internet Relay Chat: irc://irc.freenode.net/citrt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://optimus.thompsonic.com/pipermail/discuss/attachments/20090402/21ffdfe6/attachment.htm 


More information about the discuss mailing list