SCCM - Use SCCM & Application Model to Copy Files to an Endpoint

Page content

Lets say you need to copy files to a location on the endpoint. that can be done using the SCCM application model in SCCM. this way you can confirm that the file and/or folders are on the endpoint at the end.

One can do this Via PowerShell or batch file. I like to run the below command from a batch file, In the application i added the Batch file to the installation Program, this way i can add more commands to the process is needed.

Batch File:

Create a SCCM application and in the source content folder add the files you want to copy. The folder can be called what ever you want.

xcopy /E "%~dp0~staging" "C:\"

PowerShell with Zip:

Create a ZIP folder in the same directory, you can name it what ever you want.

powershell.exe Expand-Archive -Force -LiteralPath "%~dp0staging.zip" -DestinationPath "C:\staging"