Solved

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

Posted on 2006-07-05
5
1,964 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 500 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

628 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