Skip to content

Copy files to SCCM Client

Featured Replies

I need to copy a large file to multiple client SCCM (Server - SCCM 2012R2, Client - Windows Server 2008R2). Simply copy. How can this be done easily? Well if it was possible to enable reporting on whether the file is copied?
I thought about PowerShell command Start-BITSTransfer but there is no reporting.
The second idea is to use robocopy. The file is copied but the Task Sequence ends with an error.
You know a quick and simple way? Some locations have poor bandwidth.

In addition, I wanted to ask how to use the TaskSeqeunce parameter "%~dp0" ?

%~dp0 is an identifier signifying "wherever this file lives" that's typically used in .cmd/.bat files.

 

E.g. you've got a script that runs an install routine with a .msi file, then copies another file - all three of these live in the same folder. You want to make it so that if the files get moved, or if they're accessed with different methods (unc path vs drive letter), stuff will just keep working.

 

Using Flash Player as an example:

%~dp0install_flash_player_16.0.0.305_active_x.msi /qn
copy %~dp0mms.cfg %systemroot%\System32\Macromed\Flash\
if exist %systemroot%\SysWOW64\Macromed\Flash\ copy %~dp0mms.cfg %systemroot%\SysWOW64\Macromed\Flash\

First line says "run the file that lives in the same folder that this script does named install_flash_player_16.0.0.305_active_x.msi"

Second line says "copy the file that lives in the same folder that this script does named mms.cfg to %systemroot%\System32\Macromed\Flash\"

Third one does the same as the second for a 64-bit version of windows.

 

So you can run this from

\\server\share\Flash\16\FlashInstaller.cmd

N:\Flash\16\FlashInstaller.cmd (assuming N:\ is mapped to \\server\share)

D:\shares\Apps\Flash\16\FlashInstaller.cmd (if you want to run it on the server that's hosting the share)

or you can move all three files to \\someOtherServer\someOtherShare and run from there, without having to change the paths in the script.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.