Copy-Item is a powershell cmdlet that copies an item from one location to another.
Copy-Item is a powershell cmdlet that copies an item from one location to another in the same namespace. For example, it can copy a file to a folder, but it cannot copy a file to a certificate drive.
Copy-Item does not cut or delete the items being copied. The particular items that the cmdlet can copy depend on the Windows PowerShell provider that exposes the item. For example, it can copy files and directories in a file system drive and registry keys and entries in the registry drive.
Copy-Item can copy and rename items in the same command. To rename an item, enter the new name in the value of the Destination parameter. To rename an item without copying it, use the Rename-Item cmdlet.
Output
- None or an object representing the copied item.
When you use thePassThru
parameter, Copy-Item returns an object that represents the copied item. Otherwise, this cmdlet does not generate any output.