How to regenerate the agent GUIDs from the client side


Article ID: 180858


Updated On:


Management Platform (Formerly known as Notification Server)




For many reasons (see various forums posted under "duplicate GUID", "Duplicate MachineGUID" or article 3848), it is possible that multiple agents (that is, different managed computers) share the same GUID.

Article 3848 provides a method for correcting this problem but in some cases this doesn't always work as it should (based on the customer environment) or the customer cannot use the recommended method.

How can this problem be resolved then?

If the AeXAgentUtility /resetguid switch cannot be used or doesn't perform as expected, the following Visual Basic script will replace the Altiris Agent GUID directly:

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" )
sendIfUnchanged = 1
client.SendBasicInventory sendIfUnchanged, ignoreBlockouts
client.UpdatePolicies ignoreBlockouts

Create a SWD Package that contains this VBS file, and use CScript.exe within its Programs command line to run it.  Assign the Package's Task to the Collection containing the duplicated Guids that is provided via the KBA3848 toolkit.