Wednesday, March 27, 2013

Using xcopy to copy the contents of a SCCM package in a Task Sequence

When we use XCOPY to copy package content to a local machine and the xcopy fills up total C Drive with multiple packages from the local DP.
To avoid this problem, we have 2 ways

Solution # 1:
We need to specify what package we want to copy to the local machine. In this case, it will copy only the packge which we have specified.
For example:
Create a command line on the task sequence and add XCOPY to copy the content C:\Test

xcopy %_SMSTSPKGID%* C:\Test

In above command change the PKGID to your package source.

Solution # 2:
Use the xcopy command as below:
xcopy.exe ".\*.*" "C:\Test" then browse to the package which you choose to copy.
This will copy only the intended copy rather coping whole DP.


  1. Thanks, I prefer solution 2, I find it more "clean"
    when it has a source package associated.

  2. Very good tip.
    Thank you so much.