O R G A N I C / F E R T I L I Z E R: using preloadpkgonsite.exe to stage compressed copies to child site distribution points

Dec 1, 2008

using preloadpkgonsite.exe to stage compressed copies to child site distribution points

UPDATE: john marcum sent me a kind email to let me know about a problem he ran into with preloadpkgonsite.exe in the new SCCM Toolkit V2 where under certain conditions, packages will not uncompress.  if you are using the v2 toolkit, PLEASE read this blog post before proceeding.


here’s a scenario that came up on the mssms@lists.myitforum.com mailing list. when confronted with a situation of large packages and wan links, it’s generally best to get the data to the other location without going over the wire. in this case, 75gb. :/

the “how” you get the files there is really not the most important thing to worry about. once they’re there and moved to the appropriate location, preloadpkgonsite.exe is required to install the compressed source files. once done, a status message goes back to the parent server which should stop the upstream server from copying the package source files over the wan to the child site.

anyway, if it’s a relatively small amount of packages, you can run the execution like so:

preloadpkgonsite.exe <pkgid>

of course, if it was a small amount of packages, we wouldn’t be having this conversation right now. so what do you do when you have an enormous directory with 75gb worth of packages?

well, it would look a little something like this…

  1. on the site server, navigate to <installdir>\bin\i386. this is where the preloadpkgonsite.exe should have been dropped.
  2. run the following command:
for /f "delims=." %a in ('dir /b \\<siteserver>\sms_<sitecode>\inboxes\pkginfo.box\*.pkg') do preloadpkgonsite.exe %a

that will effectively run preloadpkgonsite.exe against every known package on that child site server. now there are caveats to making this work – one being that the .pkg has to exist on the child site server.

i’m really blogging this for sherry kissinger who wrote this excellent blog article on replacing secondary site servers. she claims she doesn’t want to dig this up in her email. i think really, she didn’t want to be bothered with having to blog this. :)

this is just a small part to an overall solution for managing sites across the wan. make sure you read the information associated with the preloadpkgonsite.exe tool to understand the caveats and dependencies.


  1. Oh come on now... It was your work! If I blogged it, I wouldn't have explained as eloquently as you have.

  2. I've updated that blog entry to point over here for preloadpkgonsite instructions.

  3. Folks, are we supposed to use the .PCK files or the .PKG files? I see posts indicating to use the .PCK files.


  4. if you're talking about which files to copy, you use the .pck files - which are the compressed copies. the information in this blog post uses the .pkg files to grab only the names of the files. this is used to indicate to the tool which pkg ids to preload.

    hope that helps...

  5. john marcum pointed out that i screwed up the cmd line. :) i left off the /b. it's fixed now in the post.

  6. Actually if you change the script a little to make it grab the package names from the pck files instead of the pkg files this ensures that your command actually runs against all the packages that you have pck files for.

    so use this command aftercopying the pck files to the server.

    for /f "delims=." %a in ('dir /b E:\smspkg\*.pck') do preloadpkgonsite.exe %a

    onviously replace e: with the correct drive letter though.

  7. Hi Guys,
    Thanks very much for this post.
    I have this issue where the packages have already been pushed to BDPs connected via slow links. As we have hit the 7 Day limit on package distribution, many of the packages are in "Install Pending" state (and have stopped package distribution).
    I have managed to get all the packages to the BDPs via courier and I have also copied it to the SMSPKGC$
    Is there anything that can be done to refresh the package status of the BDPs in the SCCM Primary site?