Solved

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

Posted on 2006-07-05
5
1,894 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 500 total points
Comment Utility
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
Comment Utility
That looks good... I'll try it soon and get back to you!
0
 
LVL 26

Expert Comment

by:Pber
Comment Utility
any luck?
0
 

Author Comment

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

Expert Comment

by:Pber
Comment Utility
no prob
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now