' Ver 1.1 addieren von LyncDiscover ' ver 1.2 DNS Server als zweiten parameter option explicit dim sipdomain '~ sipdomain="netatwork.de" if wscript.arguments.count = 0 then sipdomain=InputBox("Bitte SIP-Adresse oder SIP-Domain eingeben:") else sipdomain = wscript.arguments(0) end if dim dnsserver if wscript.arguments.count = 2 then dnsserver = wscript.arguments(1) wscript.echo "Using DNS-Server" & dnsserver end if if instr(sipdomain,"@")>0 then sipdomain = split(sipdomain,"@")(1) end if wscript.echo "SIP-Domain: " & sipdomain dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") call nslookup ("SRV","_sipinternaltls._tcp."&sipdomain) call nslookup ("SRV","_sipinternal._tcp."&sipdomain) call nslookup ("SRV","_sip._tls."&sipdomain) call nslookup ("SRV","_sip._tcp."&sipdomain) call nslookup ("A","_sipinternal."&sipdomain) call nslookup ("A","sip."&sipdomain) call nslookup ("A","sipexternal."&sipdomain) call nslookup ("A","meet."&sipdomain) call nslookup ("A","join."&sipdomain) call nslookup ("A","lyncweb."&sipdomain) call nslookup ("A","dialin."&sipdomain) call nslookup ("A","lyncdiscover."&sipdomain) call nslookup ("SRV","_sipfederationtls._tcp."&sipdomain) sub nslookup (strtype,strname) ' WshScriptExec Object http://msdn.microsoft.com/en-us/library/2f38xsxe%28VS.85%29.aspx dim oExec '~ wscript.echo "nslookup called type:" & strtype '~ wscript.echo "nslookup called name:" & strname Set oExec = WshShell.Exec("nslookup.exe -querytype=" & strtype & " " & strname & " "& dnsserver) Do While oExec.Status = 0 '~ wscript.echo "Wait für NSLOOKUP to return" WScript.Sleep 100 Loop dim strresult,strline,strergebnis strresult = oExec.stdOut.readall Select Case lcase(strtype) Case "a" if instr(strresult,"Name:") = 0 then strergebnis = "Nicht gefunden" else strergebnis = split(split(strresult,strname)(1),vbcrlf)(1) end if Case "srv" if instr(strresult,"SRV service location:") = 0 then strergebnis = "Nicht gefunden" else '~ strergebnis = split(split(strresult,"SRV service location:")(1),vbcrlf)(1) strergebnis = split(strresult,"SRV service location:")(1) end if Case Else strergebnis = vbcrlf & vbtab & "Warnung: unbehandelter Typ:" & strtype End Select wscript.echo "Suche " & strtype & " " & strname & " -> " & strergebnis end sub