With robocopy (Robust File Copy) you can transfer files and folders from one Windows server to another over a network share — reliably, with automatic retries on failure.
Prerequisites: RDP access to the source server. The target server needs a network share or a jointly accessible network drive. robocopy is pre-installed on Windows Server 2008 R2 and later.
| Parameter | Purpose |
|---|---|
| /E | Copies all subdirectories including empty folders |
| /COPYALL | Copies all file attributes: data, attributes, timestamps, ACLs, owner |
| /MIR | Mirrors the source directory — deletes files on the target that no longer exist on the source |
| /R:3 | 3 retry attempts on failure |
| /W:10 | 10 second wait between retries |
| /LOG | Writes progress to a log file |
Remove the share after migration: Remove-SmbShare -Name "MigrationShare"
Repeat for all other directories you need to migrate (e.g. C:\Users, C:\ProgramData).