Solved

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

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server 2000 functional level to server 2008 r2 5 73
Trust one-way issue 2 58
Ms Filer Server Migration toolkit issues 2 72
Event ID: 5719 / Source: NETLOGON 9 131
The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

831 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