I wanted to lookup a list of domains and find the NX ones. Thought it would be a simple enough task, but it seems when there is a NX domain it doesn't redirect the text to the file I specify, it redirects it to the command prompt. Somebody told me it is based on the return code of the program, if it returns 0 it will redirect to a file, and if it is an error return code like a -1 it would output to the screen. Again I thought this would be simple enough to check use an if ERRORLEVEL, but nslookup always returns 0 unless I'm doing something wrong.
So I'm looking for suggestions to achieve what I want.
Under linux everything is redirected to the file I specify *shrug*.