I'm trying to find out the next steps to get computer information from the SCCM database. I have the steps to make the connection then grab the computer but can't seem to figure out how to get the computer attributes. Please help. Here's my code below.
Dim strComputer = "ComputerConnectingto"
Dim strSMSServer = "SCCMServer"
Dim strSMSSiteCode = "SITECODE"
Dim strUserName = "username"
Dim strPassword = "password"
Dim lLocator = CreateObject("WbemScripting.SWbemLocator")
Dim gService = lLocator.ConnectServer(strSMSServer, "root\sms\site_" & strSMSSiteCode, strUserName, strPassword)
TSystem = gService.ExecQuery("SELECT * from SMS_R_System where NetbiosName = '" & strComputer & "'")
Catch ex As Exception
MsgBox("Could not connect to SCCM Server - ErrorDescription:" & Err.Description)