Forum Discussion

Tim Gade's avatar
Tim Gade
Icon for Microsoft rankMicrosoft
May 17, 2017

OneDrive for Business - Upload document using PowerShell / CSOM

I am trying to upload a file (actually copy a file from a SP site) to the default Documents list in OneDrive for Business but the Copy-PnPFile -SourceUrl $source -TargetUrl $target cmdlet is expecting a relative path versus an absolute path to https://tenant-my.sharepoint.com

 

Unfortunately I have not been able to find any PowerShell examples that can upload a file to OneDrive. Is it even possible?

 

Tim

Resources