Symantec Management Platform (Notification Server)

 View Only
Expand all | Collapse all

Change Altiris Computer GUID

  • 1.  Change Altiris Computer GUID

    Posted Nov 03, 2009 12:48 PM
    Can someone please point me to a step-by-step on how to change a computer GUID on client pc in my environment?  I am not having much luck getting the GUID to change on a pc that I am working on.  I have run the aexagentutil.exe /resetguid command and the NS keeps giving it the same GUID back.  I want the GUID to change to a different one.  How do I accomplish this?  Thanks.


  • 2.  RE: Change Altiris Computer GUID

    Posted Nov 03, 2009 02:22 PM
    That should do it and I am not sure why you would get the same guid back.  Guids should be based on a combination of things, like machine name + date/time, etc.

    You could try using vbscript to change it, but I assume it would be resetting the guid in the same way agentutil does.

    the vbscript code it:
    Dim aexClient
    Set aexClient = CreateObject("altiris.aexnsclient")
    aexClient.ClearMachineGuid
      WScript.Sleep 5000
    aexClient.SendBasicInventory True, True
    Set aexClient = Nothing

    Copy into notepad and save the file with a .vbs extension and run it.

    RS


  • 3.  RE: Change Altiris Computer GUID

    Posted Nov 03, 2009 05:54 PM
    Running the command to change the guid (for example with duplicate guids) is designed to clear the machineguids out of the registry, and then when they check back in provide a new one.

    If you're only doing this on one machine, it will most likely reference the guid it had in the database, and just return that exact same guid.

    You could always delete the record out of the database, then clear the guid, then request a new one. It's probably the only true way to get a new guid.


  • 4.  RE: Change Altiris Computer GUID

    Posted Nov 04, 2009 08:35 AM
    sure. 

    We had a computer that was configured for a user and then the NIC went bad in the machine when installing.  Instead of rebuilding the machine, we took the hard drive out of machine A and put it in machine B.  I was attempting to force the GUID to change because I do not want to have conflicting agents installed when machine A gets fixed and is back on the network. 

    Again, I am fairly new to Altiris, but my understanding is that if machine A checks into the notification server with the same name and/or serial number that the NS will assign it the same GUID it had before.  That is what I am attempting to avoid.

    Is there a better way?  Maybe the question that I should be asking is how do I deal with the Altiris agent when an occassion arises to swap a hard drive from one machine to another and both systems need to remain in inventory without the agents getting duplicate GUIDs and overwriting one another?


  • 5.  RE: Change Altiris Computer GUID

    Posted Nov 04, 2009 12:31 PM
    Are you using Asset Management?  If not, read on...if yes, it could be a little tricky...

    The original machine (once it gets a new HD)  won't have the same name as the original one, so it will get a different GUID when it is built and named.  NS generates the GUIDs (and ensures uniqueness) based on a name.domain combination (myComputer.MyDomain), assuming you are using AD and importing from AD or other domain discovery.

    So if you really want to reset the GUID, you would be to delete the existing computer object on the NS, then use the /resetGuid to get a new one from the client (or re-run your AD / Network discovery to cause a new one to be generated).  When the machine sends its basic inventory (myComputer.MyDomain), the NS will look it up, not find that key, and generate a new GUID and give it to the machine.

    But like I said, this isn't really necessary.  When the original chassis gets a new drive installed and is built with a new name, it will get its own GUID.


  • 6.  RE: Change Altiris Computer GUID

    Posted Nov 04, 2009 03:07 PM
    Kyle,

    Will it get it's own GUID even if the serial number matches a machine that has previously reported?  Does the NS only hand-out the same GUID if the machine name is the same?  i thought it would in both scenarios.

    We are using Asset.


  • 7.  RE: Change Altiris Computer GUID

    Posted Nov 04, 2009 03:35 PM
    ...Assets exist independently of electronically discovered inventory data; in fact Asset doesn't even care what the computer name is and only cares about serial number.  I believe there is a "merge" option that you can use to merge the inventory of two machines into one Asset record; I bet Jim knows a lot more about this than me.

    I hesitate to make any further recommendation since I don't know the end result of proceeding from here.  I *think* you can delete the computer object from the NS, but not the Asset record...


  • 8.  RE: Change Altiris Computer GUID

    Posted Nov 04, 2009 04:24 PM
    Thanks,

    We are in fact merging the two records so that we end up with one asset record which is the problem because when the asset records merge with duplicate GUIDs, they overwrite and compete for the same asset record. 


  • 9.  RE: Change Altiris Computer GUID

    Posted Nov 04, 2009 04:42 PM
    I've actually run across this in the past.  Essentially, instead of allowing the Altiris agent to run the resetguid routine (which will reapply the existing guid from the database), I used something similar to the script below to generate the guid client-side.

     
    'vbscript Change GUID then force client to update configuratin and send basic inventory
    Dim WshShell 
    Set WshShell = WScript.CreateObject("WScript.Shell" ) 
    Dim TypeLib, sNewGuid 
    Set TypeLib = CreateObject("Scriptlet.TypeLib" ) 
    sNewGUID = TypeLib.Guid 
    Set TypeLib = Nothing 
    sNewGuid = left(sNewGUID, len(sNewGUID)-2) 
    ' wscript.echo " # Guid Generated " + sNewGuid 
    WshShell.RegWrite "HKLM\Software\Altiris\Altiris Agent\MachineGuid" ,sNewGuid, "REG_SZ" 
    WshShell.RegWrite "HKLM\SOFTWARE\Altiris\Client Service\NSMachineGuid" ,sNewGuid, "REG_SZ" 
    WshShell.RegWrite "HKLM\SOFTWARE\Altiris\eXpress\MachineGuid" ,sNewGuid, "REG_SZ" 
    WshShell.RegWrite "HKLM\SOFTWARE\Altiris\eXpress\NS Client\MachineGuid" ,sNewGuid, "REG_SZ" 
    WshShell.RegWrite "HKLM\SOFTWARE\Computing Edge\Notification Server\MachineGuid" ,sNewGuid, "REG_SZ" 
     
    Dim client 
    Set client=WScript.CreateObject ("Altiris.AeXNSClient" ) 
    ignoreBlockouts=1 
    sendIfUnchanged = 1 
    client.SendBasicInventory sendIfUnchanged, ignoreBlockouts 
    client.UpdatePolicies ignoreBlockouts

    Credit for the original scope goes to "Brandon" at altirigos - http://www.altirigos.com/vbulletin/notification-server/7026-reset-guid-computer.html 


  • 10.  RE: Change Altiris Computer GUID

    Broadcom Employee
    Posted Nov 06, 2009 08:42 AM
    I'll claim the responsability for that script :D.

    As Brandon states on his post: "It seems there is mixed results with the switch. It looks like the official solution from the Altiris Forums is:"

    I came up with the idea to generate the guid client side as I encountered the issue with a customer of mine and the built-in functions to reset the guid (AKB #3848) wasn't resolving the issue.

    This is also documented on the AKB: How to regenerate the agent GUIDs from the client side

    Which is the article I created back in January 2007 after we tested the fix with a few people on the Altiris forum.


  • 11.  RE: Change Altiris Computer GUID

    Posted Nov 06, 2009 02:48 PM
    Full credit to Ludovic for the script, and a personal "Thank You" from me.  That methodology has saved my bacon on more than one occasion :D