Skip to Content

Copy-Item


Description
Copies an item from one location to another.
Syntax
Copy-Item [-Path] <String[]> [[-Destination] <String>] [-Recurse] [-Force]
Example
Copy-Item -Path 'C:\Source\*' -Destination 'C:\Destination' -Recurse
Parameters
Path: Required. Specifies the path to the items to copy
Destination: Optional. Specifies the path to the new location
Recurse: Optional. Copies the item and all its child items
Force: Optional. Forces the command to run without asking for confirmation
Return type
None or the copied item
Aliases
cpi, cp, copy
Supported Windows versions
Windows PowerShell 2.0 and laterWindows 7Windows 8Windows 10Windows 11Windows Server 2008 R2 and later