G
Guest
Hi
I need a little help with some VB.Net code..
I am pulling my computer's GUID out using WMI
Dim wmiObj As New System.Management.ManagementObjectSearcher("SELECT UUID FROM Win32_ComputerSystemProduct"
Dim objMgmt As System.Management.ManagementObjec
Dim MyByteGuid As Byte(
Dim MyStringGuid As Strin
Dim MyGuid As Gui
For Each objMgmt In wmiObj.Ge
MyStringGuid = objMgmt("UUID").ToString(
Nex
MyGuid = New Guid(MyStringGuid
This gives me a GUID like: DD5FE69B-2523-11D6-AB9B-FE9338A908D
Now what I need to do i lookup this GUID in the Active Directory, I now that this precise value can be found in the netbootGUID property of my computer account, so I thought it would be like
objSrch.Filter = "(&(objectClass=computer)(netbootGUID=" & MyGuid.ToString() & "))"
This does not work, and the things I've tried with MyGuid.ToByteArray has not worked either..
Does anybody know how I can make the Active Directory lookup on the netbootGUID property ?
I need to find the computers name based on the GUID I get using WMI
All the best
Henning Kristensen
I need a little help with some VB.Net code..
I am pulling my computer's GUID out using WMI
Dim wmiObj As New System.Management.ManagementObjectSearcher("SELECT UUID FROM Win32_ComputerSystemProduct"
Dim objMgmt As System.Management.ManagementObjec
Dim MyByteGuid As Byte(
Dim MyStringGuid As Strin
Dim MyGuid As Gui
For Each objMgmt In wmiObj.Ge
MyStringGuid = objMgmt("UUID").ToString(
Nex
MyGuid = New Guid(MyStringGuid
This gives me a GUID like: DD5FE69B-2523-11D6-AB9B-FE9338A908D
Now what I need to do i lookup this GUID in the Active Directory, I now that this precise value can be found in the netbootGUID property of my computer account, so I thought it would be like
objSrch.Filter = "(&(objectClass=computer)(netbootGUID=" & MyGuid.ToString() & "))"
This does not work, and the things I've tried with MyGuid.ToByteArray has not worked either..
Does anybody know how I can make the Active Directory lookup on the netbootGUID property ?
I need to find the computers name based on the GUID I get using WMI
All the best
Henning Kristensen