Jesper Ravn
2009-10-29 13:53:45 UTC
Hello
How can i retrive operatingSystem from a specific computer/server.
Please see my code below.
Dim StrComputer as string
StrComputer = "SQLserver01"
adoCommand.CommandText = "SELECT Name, operatingSystem FROM " _
& "'LDAP://DC=DOMAIN,DC=COM' WHERE objectClass='computer' " _
& "and Name = " & StrComputer & ""
adoRecordset = adoCommand.Execute
Dim strOperatingSystem As String
strOperatingSystem = adoRecordset.Fields("operatingSystem").Value
It fails when running the execute command.
Hopefully you can me in the right direction.
Thanks;
/Jesper
How can i retrive operatingSystem from a specific computer/server.
Please see my code below.
Dim StrComputer as string
StrComputer = "SQLserver01"
adoCommand.CommandText = "SELECT Name, operatingSystem FROM " _
& "'LDAP://DC=DOMAIN,DC=COM' WHERE objectClass='computer' " _
& "and Name = " & StrComputer & ""
adoRecordset = adoCommand.Execute
Dim strOperatingSystem As String
strOperatingSystem = adoRecordset.Fields("operatingSystem").Value
It fails when running the execute command.
Hopefully you can me in the right direction.
Thanks;
/Jesper