4.1.0 HP PolyServe Software for Microsoft SQL Server administration guide (T5392-96074, October 2010)

Else
Wscript.Echo "User Logon: " &
oRecordset.Fields("samAccountName")
End If
If DUMP_SPNs Then
'--- Display the SPNs on the object ---
vSPNs = oRecordset.Fields("servicePrincipalName")
For Each vName in vSPNs
Wscript.Echo "-- " + vName
Next
End If
Wscript.Echo
oRecordset.MoveNext
Wend
End If
oRecordset.Close
oConnection.Close
Sub ShowUsage()
Wscript.Echo " USAGE: " & WScript.ScriptName & _
" SpnToFind [GC Servername or Forestname]"
Wscript.Echo
Wscript.Echo " EXAMPLES: "
Wscript.Echo " " & WScript.ScriptName & _
" MSSQLSvc/MySQL.company.com:1433"
Wscript.Echo " " & WScript.ScriptName & _
" HOST/Server1 Corp.com"
Wscript.Quit 0
End Sub
Sub ParseCommandLine()
If WScript.Arguments.Count <> 1 And WScript.Arguments.Count <> 2
Then
ShowUsage()
Else
strSPN = WScript.Arguments(0)
If WScript.Arguments.Count = 2 Then
strGCPath = "GC://" & WScript.Arguments(1)
Else
'--- Get GC --
Set oNSP = GetObject("GC:")
For Each oGC in oNSP
strGCPath = oGC.ADsPath
Next
End If
End If
End Sub
HP PolyServe Software for Microsoft SQL Server 4.1 administration guide 137