Thursday, February 18, 2010

Conflicting records in SCCM after re-imaging a system using PXE or DVD/USB

I've found that when if I re-image system that is already in SCCM a new record is created but the old record for the asset is not removed. Its actually very frustrating as it means that the wrong record can be put in a collection and therefore never work the way it was intended.

The duplicate/conflicting record doesn't appear if you re-run the task sequence the run advertised programs within windows.

What happens is when the task sequence comes up to the installing SCCM client it generates a new client ID which is why it creates a new record in SCCM. But the big problem is it doesn't delete the old record it just creates a new one with the same name but new GUID and ClientID.

I've been racking my mind for a solution to this issue. It turns out a earlier solution was almost in place I just needed to tweak a few things.

The solution I've come up with;

-Setup the Task System variable for OSDComputerName on the Unknown Computers collection
- Create a VB script that detects if this is a 'new' system or an 'existing' system. This can be done using a VBscript that checks if OSDComputerName variable is Null; if it is then we know it an existing system.

- If OSDComputername variable is Null then read the SMSMachineName variable and delete it from SCCM just before we install the client.





-

No comments :

Post a comment