Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Lookup the AD netbootGUID Value and compare it to the local WMI UUID value

Posted on 2006-07-05
5
Medium Priority
?
2,009 Views
Last Modified: 2007-12-19
Does anyone know how I could compare a local pc's UUID and compare it to the netbootGUID value stored in Active Directory????
0
Comment
Question by:CameronFrasnelly
  • 3
  • 2
5 Comments
 
LVL 26

Accepted Solution

by:
Pber earned 2000 total points
ID: 17057697
Try this vbs script:

wscript.echo "UUID:        " & getcomputerUUID
WScript.Echo "netbootGUID: " & getComputerNetBootGuid


Function GetComputerUUID
      Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
      Set colSystems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct")
      For Each objSytem In colSystems
              getcomputerUUID = objSytem.uuid
      Next
End Function

Function GetComputerNetBootGUID
      Set objPC = GetObject("LDAP://cn=somePC,cn=computers,dc=domain,dc=com")  'you need to change this line to match your PC's distinguished name in AD.
      strObjectGUID = objPC.objectguid
      GetComputerNetBootGUID = ConvertObjectGuidToString(strObjectGUID)
End Function

Function ConvertObjectGuidToString(ByVal arrRawObjectGUID)
      Dim i, strByte
      Dim arrObjectGUID(15)
      For i = 1 To LenB(arrRawObjectGUID)
            strByte = Hex(AscB(MidB(arrRawObjectGUID, i, 1)))
            If Len(strByte) = 1 Then strByte = "0" & strByte
            arrObjectGUID(i - 1) = strByte
      Next
      ConvertObjectGuidToString = Join(arrObjectGUID, "")
End Function
0
 

Author Comment

by:CameronFrasnelly
ID: 17072977
That looks good... I'll try it soon and get back to you!
0
 
LVL 26

Expert Comment

by:Pber
ID: 17102491
any luck?
0
 

Author Comment

by:CameronFrasnelly
ID: 17102707
Haven't tested but shoudl work for me... thanks!
0
 
LVL 26

Expert Comment

by:Pber
ID: 17102708
no prob
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question