Does anyone know how the ZenWorks device GUID is generated? I know about the places it is stored (pre-agent reg key and image safe data) but I want to know how it is generated.

I added a workstation to ZCM and made note of its device guid, then I unregistered the workstation from ZCM, uninstalled the agent from the workstation (I removed every trace of novell, casa etc), cleared the image safe data, generated a new sid on the workstaion, and then I redeployed the zen agent to the workstation and then checked the ZEN device GUID and the workstation is listed with the exact same device GUID as before!!!

Was unregistering the workstaion not enough to get it out of ZCM? What more needs to be done? When the workstation with the new SID registered with ZCM, how did ZCM manage to give it the exact same GUID it had under a different SID (yes - image safe data had been completely cleared)?