keybrdcowboy
IS-IT--Management
This seems like it should be very simple, but I can't get it to work. I have a text file that contains a list of machine names, and I need to run a command line that does an nslookup and outputs the results to a text file. So far I am just trying to get the output to a file to work. I can do a "nslookup machinename > textfile" and that works fine from the command prompt, but when I run "set Shell = CreateObject("WScript.Shell")
'
'commandline = "%systemroot%\System32\nslookup Lak37cswk13903 > c:\nslookup.txt"
'Shell.Run commandline, 1 , True" I get nothing. Can anyone help? Thanks.
'
'commandline = "%systemroot%\System32\nslookup Lak37cswk13903 > c:\nslookup.txt"
'Shell.Run commandline, 1 , True" I get nothing. Can anyone help? Thanks.