Sep 23 2020 07:23 AM
Apologies if this needs to go in a Teams or Powershell forum, but i thought id try here first!
I have a powershell script using:
Connect-AzAccount
Connect-MicrosoftTeams,
AzureADPreview\Connect-AzureAD
As part of creating the new Teams we would like to prepopulate the attached SharePoint site with a copy of some document from a SharePoint online site. Does anyone have any knowledge or pointers on doing this? Can this be done with the above modules or with the connect-pnponline.
Ive looked at PnP copy-pnpfile but im not sure if it can copy to a Teams site?
cheers
Sep 23 2020 10:24 AM
SolutionHi @Steve Canvin ,
You can use Copy-PnPFile to copy files and folders between sites collections.
SharePoint site behind a team is a SharePoint team site, so you can use that as a target.
Notice that currently there is a 200MB file size limit per operation.
Sep 24 2020 01:38 AM
@Matti Paukkonen Thanks. Im trying to copy a file from one file to anther in the same library for some testing and get:
Copy-PnPFile : File Not Found.
Ive read online that there is a bug with this feature, do you know if this is the case?
Sep 24 2020 06:39 AM
Sep 23 2020 10:24 AM
SolutionHi @Steve Canvin ,
You can use Copy-PnPFile to copy files and folders between sites collections.
SharePoint site behind a team is a SharePoint team site, so you can use that as a target.
Notice that currently there is a 200MB file size limit per operation.