Skip to content

Latest commit

 

History

History
155 lines (125 loc) · 3.12 KB

File metadata and controls

155 lines (125 loc) · 3.12 KB

DSC Resource 'Robocopies'

Robocopies performs large file copy operations with advanced options like multithreading, restarts, and content exclusions using Robocopy.

When to use 'Robocopies'

Use this resource when you need to synchronize files or folders between locations with enterprise-grade reliability. Robocopy supports multithreaded copying, resume on failure, mirroring, and complex exclusion rules. It is ideal for content deployment, file server migrations, or maintaining synchronized folder structures.

Source

DSC Resource

Documentation

Table 1. Attributes of category 'Robocopies'
Parameter Attribute DataType Description Allowed Values

Items

Mandatory

Hashtable[]

set of robocopy items

Table 2. Attributes of category 'Robocopies/Items'
Parameter Attribute DataType Description Allowed Values

Source

Mandatory

String

Source Directory, Drive or UNC path.

Destination

Mandatory

String

Destination Dir, Drive or UNC path.

Files

String

File(s) to copy (names/wildcards: default is all files).

Retry

UInt32

Number of Retries on failed copies: default 1 million.

Default: 1000000

Wait

UInt32

Wait time between retries: default is 30 seconds.

Default: 30

SubdirectoriesIncludingEmpty

Boolean

Copy subdirectories, including Empty ones.

  • True

  • False

Restartable

Boolean

Copy files in restartable mode.

  • True

  • False

MultiThreaded

Boolean

Do multi-threaded copies with n threads (default 8).

N must be at least 1 and not greater than 128. This option is incompatible with the /IPG and /EFSRAW options. Redirect output using /LOG option for better performance.

  • True

  • False

ExcludeFiles

String

Exclude Files matching given names/paths/wildcards.

LogOutput

String

Output status to LOG file.

AppendLog

Boolean

Determine whether to overwrite log file or append.

  • True

  • False

AdditionalArgs

String[]

Use this option to set additional parameters.

Robocopy has MANY configuration options. Too many to present them all as DSC parameters effectively. Each parameter should be a separate array member. This array will be combined with main argument array. For a list of options run Robocopy /??? in a shell window.

Example
Robocopies:
  Items:
  - Source: C:\Test
    Destination: C:\Test2
    MultiThreaded: true
    Restartable: true
    AdditionalArgs: '/mir'