Hvordan for jeg netbootGUID (UUID) med LDAP?
Jeg har denne kode og kan godt "få" Name men ikke netbootGUID.Kode:
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText = _
"Select Name, netbootGUID from 'LDAP://DC=domain,DC=dk'" _
& " where objectClass='computer' "
objCommand.Properties("Page Size") = 6000
objCommand.Properties("Timeout") = 30
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.Properties("Cache Results") = False
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
Wscript.Echo "Computer Name: " & objRecordSet.Fields("Name").Value
Wscript.Echo "netbootGUID: " & objRecordSet.Fields("netbootGUID").Value
objRecordSet.MoveNext
Loop