Parameters for Copy-Item
Cmdlet
| Parameter |
Function |
| -path |
Specifies the path to the items to copy |
| -destination |
Specifies the path to where the items are to be copied |
| -container |
Preserves container objects during the copy operation |
| -recurse |
Specifies a recursive copy |
| -force |
Allows cmdlet to override restrictions such as renaming existing files as long as security is not compromised |
| -include |
Specifies only those items upon which the cmdlet will act, excluding all others |
| -exclude |
Omits the specified items. Wildcards are permitted. |
| -filter |
Specifies filter elements |
| -passThru |
Passes the object created by this cmdlet through the pipeline. By default, this cmdlet does not pass any objects through the pipeline. |
| -credential |
The credential is used to validate access |
| -literalPath |
Specifies a path to the item. The value of -LiteralPath is used exactly as it is typed. |
| -whatIf |
Describes what would happen if you executed the command without actually executing the command. |
| -confirm |
Prompts you for confirmation before executing the command |
| <CommonParameters> |
This cmdlet supports the common parameters: -Verbose, -Debug,
-ErrorAction, -ErrorVariable, and -OutVariable. |