myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


script to delete ConfigMgr machine account

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> script to delete ConfigMgr machine account Page: [1]
Login
Message << Older Topic   Newer Topic >>
script to delete ConfigMgr machine account - 8/28/2008 3:16:04 PM   
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
Post #: 1
RE: script to delete ConfigMgr machine account - 9/2/2008 1:35:48 PM   
rbennett806


Posts: 825
Score: 13
Joined: 6/14/2006
Status: offline
Take a look at the SCCM_FrontEnd.HTA script found here: http://www.myitforum.com/articles/19/view.asp?id=11652. It's got some VBScript code in it that removes the old client resource record and does some other things. Hopefully that'll give you the code you need...

(in reply to egiroux)
Post #: 2
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> script to delete ConfigMgr machine account Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.703