Isto parece funcionar muito bem
Public function GetOS(ServerName)
Set objWShell = CreateObject("WScript.Shell")
Set objCmd = objWShell.Exec("nmap -O -v " & ServerName)
strPResult = objCmd.StdOut.Readall()
set objCmd = nothing: Set objWShell = nothing
GetOS = "Unknown"
if InStr(strPResult,"OS details:")>0 then
strTemp1 = split(strPResult,"OS details: ")
strTemp2 = split(strTemp1(1),vbCrLf)
GetOS = strTemp2(0)
end if
End function
wscript.echo GetOS(testserver)