Nonmemory where I obtained the following code...
Clear
Local oShell as Wscript.Shell
oShell = CreateObject("Wscript.Shell")
oExec = oShell.Exec(GetEnv("ComSpec") + " /c nslookup -type=MX yahoo.com")
DO While oExec.Status <> 1
*'Wait for the command to be run completely
EndDo
strResult = ""
strResult = oExec.StdOut.ReadAll
? strResult