I add a new computer on a collectrion for OS deployment. All it's OK but if i delete the machine on the collection(click on the collection, select the computer and press delete, there enough a trace of the computer on membershiprule.
It's due to my creation?
i use the code found on the SDK.
public int AddNewComputer(WqlConnectionManager connection, string netBiosName, string smBiosGuid, string macAddress, string colID)
if (smBiosGuid == null && macAddress == null)
throw new ArgumentNullException("smBiosGuid or macAddress must be defined");
// Reformat macAddress to : separator.
if (string.IsNullOrEmpty(macAddress) == false)
macAddress = macAddress.Replace("-", ":");
// Create the computer.
Dictionary<string, object> inParams = new Dictionary<string, object>();
It's not terribly clear what you're asking but if you delete a computer directly from a collection (as opposed to going into the collection properties and deleting it) then you will delete the computer from the SCCM DB and that resource will no longer
exist (and therefore will not be able to add it to any other collection).