Flight is delayed - try this version:
 Code:
Function NSLookup($_ID)

  Dim $_sR, $_sE		; Return string
  Dim $_oExec			; WScript object

  ; Use WScript to execute the command and check the result
  $_oExec = CreateObject("WScript.Shell").Exec('nslookup ' + $_ID)
  If Not VarType($_oExec) = 9
    $NSLookup = ''
    Exit 10
  EndIf

  ; get the command result and extract what is needed 
  ; $_sR holds name result from StdOut, $_sE holds StdErr as single string
  $_sR = Trim(Split(Join(Split($_oExec.StdOut.ReadAll, @CRLF), ''),'name:')[1]) 
  $_sE = Trim(Join(Split($_oExec.StdErr.ReadAll, @CRLF), ''))

  ; return alternate status based on errors in StdErr output
  Select
    Case InStr($_sE, 'Non-existent')
    $NSLookup = 'Non-existent'
    Exit 67
  EndSelect

  ; process the return string
  If Not $_sR
    $NSLookup = ''
    Exit 67
  Else
    $NSLookup = Split($_sR, 'Address:')[0] + ',' + Trim(Split($_sR, 'Address:')[1])
    Exit 0
  EndIf

EndFunction

This should get you going. The result you were looking for was in StdErr, which wasn't being processed. It's returning a "non-existent" string, which is NOT a good idea, since it breaks the original functionality:
$X = NsLookup('fqdn')
If Not $X
@SERROR ?
; handle error
Else
; handle successful lookup
EndIf

You'd be much better to return an error code that you identify with "non-existent" instead of "Network Name not found" (which is error 67 that is returned now). You might want to consider using exit value 487. ;\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D