Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-07-05
5
Medium Priority
?
1,988 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 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