Apr 062010
 

@echo off
REM This batch script will only find hostnames in domain.com or bhs.domain.com
REM Author: Robert Holland

if {“%1”} == {} goto :HelpMe
if {%1} == {^/^/} goto :HelpMe
if {%1} == {^/?} goto :HelpMe
if {%1} == {^/h} goto :HelpMe
if {%1} == {-h} goto :HelpMe

if NOT {%1} == {} (
@echo.   —————————
@echo   [“CHECKING DOMAIN.COM”]
@echo.   —————————
nslookup %1.domain.com
@echo.
@echo.
@echo.
@echo.  ——————————–
@echo   [“CHECKING BHS.DOMAIN.COM”]
@echo.  ——————————–
nslookup %1.bhs.domain.com)else goto HelpMe
goto :eof

:HelpMe
@echo “Usage:
@echo. [lookup hostname]”