How can I get easily the Machine GUID ?

Discussion in 'Windows Server' started by GUID, Jan 19, 2006.

  1. GUID

    GUID Guest

    How can I get easily the Machine GUID ? (on a Windows 2003 server)
    Any tool ?

    Thanks a lot in advance for your answer!
     
    GUID, Jan 19, 2006
    #1
    1. Advertisements

  2. See if this works for you...

    dsget computer [ComputerDN] -sid

    The dsget command set is native to Windows 2003 servers. If you want to run
    it from an XP workstation, install the Admin Tools from the Windows 2003
    Server CD on to the XP workstation.

    To get the Computer DN you can query the Domain for it:

    dsquery computer -name [workstation name or partial with wildcards]

    Then pipe it into the other command... here is an example when the
    workstations are all from SALES so they all start with SALES followed by a
    number 001.

    dsquery computer -name SALES* | dsget computer -sid

    The result will be a list of the SIDs.
     
    Paul Hinsberg, Jan 19, 2006
    #2
    1. Advertisements

  3. GUID

    GUID Guest

    Thank you for your answer but this is giving me the SID, not the GUID
    Any other ideas ?
    Laurent

     
    GUID, Jan 19, 2006
    #3
  4. Doh! Here is a short script that will run on a workstation and display the
    GUID:

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
    Set colComputer = objWMIService.ExecQuery("SELECT * FROM
    Win32_ComputerSystemProduct")
    For Each objCompItem In colComputer
    WScript.Echo "Your GUID is: " & objCompItem.UUID
    Next

    --
    Paul Hinsberg


     
    Paul Hinsberg, Jan 19, 2006
    #4
  5. GUID

    GUID Guest

    looks much better
    thanx!

     
    GUID, Jan 19, 2006
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.