egiroux
Posts: 169
Score: 4 Joined: 4/4/2006 From: Portland, Maine Status: offline
|
I'm working on automating the process for re-imaging computers with ConfigMgr and manipulating collection membership, site membership, etc. using scripts with info in the SDK. I've automated the addition of a computer not in the database using the ImportMachineEntry method, but I can find nothing in the SDK in regards to deleting obsolete records out of the database. In my testing my imported computer accounts in the collection where my TS is advertised get left behind for a while after the imaging is completed. After the TS is successfully completed I have an entry for the computer in the All Systems collection which is the new entry that has the updated computer name. I also still have the old account in the original "Computers Awaiting Image" collection I have created where my TS is advertised. The older account is marked as obsolete. I'm trying to automate the step of having to delete that obsolete account. I have automated the step where a new direct membership rule is created for the "Computers Awaiting Image" collection so that the new account under the All Systems collection also shows up in the necessary collection so it can be re-imaged. Don't see any methods or reference in the SDK to be able to delete an account out of the ConfigMgr database. Especially for test machines that get re-imaged repeatedly it would be nice to automate the deletion of obsolete records. Thanks
|