[BUG]: Copy-PnpFile not working from Team Site Library to O365 Group Library - Returns nothing, but doesn't copy. #1289
Replies: 9 comments
-
Are you just trying to copy a document from a document library in |
Beta Was this translation helpful? Give feedback.
-
I was able to do this with 1.8.0. Here are the steps I used:
|
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Yes, except that the source site is the default SP Team Site. I will try some more different combinations to see if I can isolate this further. |
Beta Was this translation helpful? Give feedback.
-
@ToddKlindt , this is what happens to me:
However, when I do the following it works:
|
Beta Was this translation helpful? Give feedback.
-
Is that the actual PowerShell you're using? I notice the URLs are https instead of HTTPS. How are you connecting? Regular username and password? |
Beta Was this translation helpful? Give feedback.
-
Typo (not copying and pasting). http instead of https, but otherwise yes. And normal username and password. I have almost got to the bottom of all but one issue, which I may have to leave. Will post a write up here when I know more. |
Beta Was this translation helpful? Give feedback.
-
Transferring to Discussions. @jeremyhagan - As @ToddKlindt showed, there's no issue with the commands. And I also have no problem on my side copying from one site to the other.
You don't need to have 2 different connections when copying from one site to the other, it'll switch automatically. Do you have access to the target site? Also, can you do the copy via the SPO UI? |
Beta Was this translation helpful? Give feedback.
-
If you get Access Denied on the target site, you do not have access with the account you use. |
Beta Was this translation helpful? Give feedback.
-
Reporting an Issue or Missing Feature
When I use Copy-PnpFile to copy within a Doc library it works fine, but when trying to copy from the Root Team site to a Doc library on another site the file is not copied and no error is returned.
I've tried various combinations of including the leading "/" in the sourceUrl and specifying or omitting the -connection parameter in the command.
Not using the -connection parameter or specifying the target site connection returns no error, but the file is not copied.
Omitting the leading "/" in the SourceUrl causes the error "The system cannot find the file specified"
Specifying the source site connection causes a return value with the message: The system cannot find the path specified. (Exception from HRESULT: 0x80070003)
Expected behavior
Expect the file to copy
Actual behavior
Nothing
Steps to reproduce behavior
What is the version of the Cmdlet module you are running?
Copy-PnpFile version 1.8.0
Which operating system/environment are you running PnP PowerShell on?
Beta Was this translation helpful? Give feedback.
All reactions