This project is read-only.

File copy

Nov 5, 2014 at 9:22 PM
I've noticed that the PSFileTransfer commands are really slow and it looks like it sends single files one at a time. Is there a better way to transfer source files over instead of allowing the various commands to copy the folder contents? If I copy it manually (via GUI) it'll copy a whole source folder in a few seconds but if I let AutomatedLab copy it will take a significant amount of time to get there.

An example is the prerequisites for SCCM. 4GB and doing it manually it'll take maybe a minute to copy over. Doing it with AutomatedLab takes like 45 minutes, thus making the lab build/rebuild times pretty long if I want to install and configure software. I didn't report this as an issue as it's entirely possible I'm just using it wrong.
Nov 14, 2014 at 10:45 AM
AL uses WinRM to copy the data which is by no doubt very slow. We did this as you do not need to care about the credentials.

However in your scenario I would suggest using SMB. The firewall is disabled on all lab machines by default. I did not expect the prerequisites to be so big.

Would you mind sharing your SCCM install script when you got it working?
Nov 19, 2014 at 7:18 PM
Definitely. I mostly just combined a few different scripts I found so I haven't really cleaned it up, but I'll share it out once I wrap it up. If you're curious how I modified my script to account for the large file copies I did this and just used robocopy. I still let it just use the built-in one for small file counts, etc but a few items I have going out are like the SCCM prereqs.

NET USE \$labprefix-SCCM1\IPC$ /u:$labChildDomain\Administrator Password2
robocopy $labSources\SoftwarePackages\SCCM2012R2Prereqs \$labprefix-SCCM1\C$\SCCM2012R2Prereqs\ /E /NP /Z /NFL /NDL /NJH /NJS /nc /ns
robocopy $labSources\SoftwarePackages\SCCM2012R2 \$labprefix-SCCM1\C$\SCCM2012R2\ /E /NP /Z /NFL /NDL /NJH /NJS /nc /ns #for testing I use /E /V /XO /NP /Z
NET USE \$labprefix-SCCM1\IPC$ /D
Jan 7, 2015 at 11:05 AM
Would it make sense to use New-ISOFile ( to "wrap" the files in an ISO and Mount it on the machine? I'm just spitballing here :D
Sep 20, 2015 at 6:21 PM
I know last post was long time ago but just wanted to add that if you need files for pre-requisites, you can place the files in the tools folder of the VM. When using Hyper-V, the content of the tools folder is copied by mounting the vhdx file (before the VM starts) and copying "locally".

When it comes to Azure, it is still WinRM being used as copying through SMB is not possible.