Share via


SharePoint Online SPOMod: Copy-SPOFile

This article describes a function of a custom SharePoint Online module available for download and installation on GitHub.

Copy-SPOFile

Copies a file. 

Parameters

ServerRelativeUrl Mandatory  The server relative url of the file
DestinationLibrary  Mandatory  Server relative address of the destination library. The library needs to be on the same site.
Overwrite   Optional  Boolean. Whether any existing files in the destination library should be overwritten. 
NewName  Optional  String. If you want to rename the file and copy it with a new name, specify this parameter 

 

Examples

----- EXAMPLE 1 ------

Copy-SPOFile -ServerRelativeUrl "/sites/powie4/Destiny2/NewSPOList3.psm1"  -DestinationLibrary "/sites/powie4/Shared Documents"

See Also

SPOMod Cmdlets and Resources 
Connect-SPOCSOM
Get-SPOList