On May 18, 4:12 am, Jeremy <Jer...[ at ]discussions.microsoft.com> wrote:
[Quoted Text] > This script will loop through a file called computers.txt with the computer > name of each computer you want to check, one per line. Watch the line > wrapping though. > > -->8 > [ at ]ECHO OFF > FOR /F %%b in (computers.txt) do call :FindComp %%b > GOTO END > > :FindComp > SET FOUND=NO > FOR /F "usebackq delims=" %%a in (`dsquery computer -Name %1`) do ( > IF NOT [%%a] == [] SET FOUND=YES > ) > ECHO %1,%FOUND% > Exit /b > > :END > -->8 > > > > "VR" wrote: > > Hi, > > > I need to create a batch file to check a list of computers which is in > > Active directory or not. > > > I can query this by using simple dsquery computer command. > > > but i need to write a script which will take the system name from my > > notepad(using for each %1 in test.txt) > > > I need the output in the format hostname firstcolumn and Availability > > (yes/no) in the next column. > > > Pls. some one help for this > > > Thanks > > HAI- Hide quoted text - > > - Show quoted text -
Hi Jeremy,
Really thanks a Million for this yar.
Ur script is working & solved my need
Once again Thanks man
RANG
|