none
Windows server 2008 Redirect Command output to text file RRS feed

  • Question

  • Hi,

    I have 200 machnes and i want to check if they are joined to AD or not I do nor have XP machines in domain. When i run a batch file with following command on Windows 2008 it creates blank text file. Same batch file works on XP machine.

    I even tried typing full path for NBTSTAT.exe but no luck.

    How can i execute batch file on windows 2008 with output redirecting to text file. Or any other way to test this?

    cmd.exe /C NBTSTAT.exe -a Machine1 >Temp.txt & type Temp.txt >>NbtstatResult.txt
    cmd.exe /C NBTSTAT.exe -a Machine2 >Temp.txt & type Temp.txt >>NbtstatResult.txt
    cmd.exe /C NBTSTAT.exe -a Machine3 >Temp.txt & type Temp.txt >>NbtstatResult.txt

    Thursday, June 2, 2011 6:04 AM

Answers