Remove child objects with Preinst.exe
I had posted a previous question and was advised to use the Preinst.exe tool with the /deljob to clean up left overs when I broke the Child parent relationship. The deljob ran on our Parent SCCM Site server without issue and reported deleting jobs for the child site. I still see the child objects in our SCCM console for the child site soI looked into running /delsite to remove child site code from the SCCM console, When I ran the preinst /delsite <child site code> I received an error stating that I needed to state the parent site code which I would not want to do . I wanted to see if there was another way to clean this up. The sms 2003 site had been made a child of our SCCM site for client migration to SCCM. This all worked well and the child site had been there for a few months. The child site and parent site are now both central site with no address referring to each other. Our SCCM site has a SQL database on another server, not sure if this matters? I just want to clean this up as the SMS 2003 site is going away.On our SCCM site we are getting component status messages trying to communicate with the old child site although the deljob was ran and there are no connections to this site. Message ID for SMS_Scheduler is 3400 where the scheduler no longer has an address defined for our Child site. This was removed from SCCM when we broke the child parent relationship. Thanks, Brit
November 5th, 2008 5:53pm

Considering the state you're currently in, preinst /delsite is the way to purge the SMS 2003 child site informationfrom the SCCM 2007site's database (effectively removing it from the hierarchy). Not sure why you're seeking a different method, there's no risk here that I know of. /delsite <removed child site code> <parent site code> This command, which you run from the parent site, deletes incorrectly removed child sites from the site database of the parent site. Use this option if you removed a site before you detached it from its parent. This transaction does not propagate up the site hierarchy to all parent sites of the current site. Note The /delsite command does not uninstall the site referred to by <removed child site code>. It merely removes the site information from the local Configuration Manager 2007 site database. http://technet.microsoft.com/en-us/library/bb680827.aspx
Free Windows Admin Tool Kit Click here and download it now
November 5th, 2008 7:02pm

Hi Jeff, Thanks for the clarification. I am using this command on our SCCM site, but I am receiving an error. Here is what I have done: CMD Browse to Program files\Microsoft Configuration manager\bin\i386\00000409 Preinst /DELSITE then our child site code. I receive Missing required parameters. The correct syntac is: Preinst /DELSITE SiteCode ParentCode. Would I need to do Preinst /DELSITE child site code Parent site code? I believe I may need to also run the /deinstall to remove the secondary site from the site hierarchy, but wanted to check. We want to remove the child objects from the SCCM console. Thanks, Brit
November 6th, 2008 5:48pm

Forgot to mention that I have also ran Preinst /DELSITE childsite parentsite and then receive a message that our child site is not a known site, but the objects remain in the SCCM admin console.
Free Windows Admin Tool Kit Click here and download it now
November 6th, 2008 5:52pm

I ran the three different Preinst commands and found that the deljob continued to find and delete jobs for our child site although there is no connection. The delsite and deinstall commands both notified that the child site was not being found. I ended up calling Microsoft and found that I did break the child parent relationship correctly, but there were still references to the child in our SCCM database. Our SQL DBA ran a provided script to remove these references and now the child objects are no longer present in the SCCM admin console. The items removed where: DELETE FROM SysResList WHERE SiteCode = 'XXX' DELETE FROM SiteBoundaryADSite WHERE SiteCode = 'XXX' DELETE FROM SiteBoundaryIPSubnet WHERE SiteCode = 'XXX' DELETE FROM SiteControl WHERE SiteCode = 'XXX' DELETE FROM SiteControlNotification WHERE SiteCode = 'XXX' DELETE FROM Sites WHERE SiteCode = 'XXX' DELETE FROM Sites_DATA WHERE SiteCode = 'XXX' DELETE FROM SiteWork WHERE SiteCode = 'XXX' DELETE FROM PkgServers WHERE sitecode = 'XXX' DELETE FROM PkgStatus WHERE sitecode = 'XXX' Jobs for our child site are nowclearing out on their own and some were manually deleted when monitoring the schedule.log file.
November 6th, 2008 8:53pm

I ran the three different Preinst commands and found that the deljob continued to find and delete jobs for our child site although there is no connection. The delsite and deinstall commands both notified that the child site was not being found. I had the same thing while trying to remove an old secondary site from a primary site db.I did some research and found out that this really is caused by permission issues. The user you perform the "Preinst /delsite" with needs to have permissions to do so; unfortunately, Preinst's error message is misleading.In fact, Preinst checks the database table "dbo.Sites" and compares it with "dbo.SecurityObjInstances" to find out if that user has the required permissions. In my case, i just added explicit permissions for my user, and it worked like a charm.(The query Preinst executes checks explicitly for the user, so being a member of the sms admin group doesn't help)
Free Windows Admin Tool Kit Click here and download it now
September 24th, 2009 2:37pm

I have had this problem and similar problems with sites not disappearing from the top primary but from the childs primary site server when uninstalling sites andhave alsoreceivedthemessage that our child site is not a known site. Uninstall the child site from its primary server using the technet article http://technet.microsoft.com/en-us/library/bb632423.aspx Delete the sender address to the child on its primary site. Note: In my examples below the sitecode TBG is the child and S02 is its primary site. Run preinst.exe /deljob. Example: preinst.exe /deljob TBG Run preinst.exe /delsite. Example: preinst.exe /delsite TBG S02 Run preinst /deljob on the top primary site. Example: preinst.exe /deljob TBG Run preinst /delsite on the top primary site. Example: preinst.exe /delsite TBG S02 Uninstall the Microsoft System Center Configuration Manager 2007 Secondary Site from Add/Remove Programs on the Child site. Check AD to see if the site record under Systems Management OU has been removed, if not remove them manually. Note: If you connect to your primary site via RDP use the switch /console or /admin depending on RDP version. Open a cmd.exe window. - Inside this command windows, run the following command: AT.EXE <future time> /INTERACTIVE CMD.EXE Example: AT.EXE 2:50PM /INTERACTIVE CMD.EXE This schedules a Task at 2.50PM - At the specified time, a new cmd.exe window opens (which runs using system account credentials) Inside this new cmd.exe window, run the preinst.exe /delsite commands again on both the childs primary and higher in the hierarchy if you have a primary at the top. RegardsNiklas
October 1st, 2009 11:08am

This worked for me! I went to console, right click on the site which I want to delete and added my user ID as admin in security tab. after that preinst.exe was able to remove the site. Good Find, Thanks to M.Appel.
Free Windows Admin Tool Kit Click here and download it now
January 25th, 2011 3:55am

This worked for me! I went to console, right click on the site which I want to delete and added my user ID as admin in security tab. after that preinst.exe was able to remove the site. Good Find, Thanks to M.Appel.
January 25th, 2011 3:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics