Dynamic file copy

A common requirement is to be able to copy one or more files to devices, specifying a destination folder. Dynamic file copy lets you create an instruction which will embed these files as resources and then, when it is executed on the target device, copy them to the specified destination folder.

Dynamic file copy uses the 1E Platform to securely distribute a dynamically created instruction which performs the copy. This allows you to copy files to devices securely and without requiring any kind of file share.

The invoke-dynamic cmdlet is used as shown below:

Copy
invoke-1Edynamic -files <files> -path <dest path> -targetscope  <scope> | -targetfqdns <fqdns>

You can specify a single file directly. Multiple files should be specified as an array, that is, @("file1.txt","file2.txt").

In the example below, two files (x.txt and y.txt) in the current folder are to be sent to a destination folder (c:\newfiles) on the target devices.

The destination folder is created automatically if it does not exist. Any files which already exist in that folder with matching names will be overwritten silently.