Forum Discussion
Looking to generate Powershell script to copy/move files from ODFB to Sharepoint Online Site
As a PS Noob, I have been fighting a script for a couple days.
As part of our User Deprovisioning, we need to move all data from the Users OneDrive to a DigitalArchive site in Sharepoint Online.
I have been able to script access to ODFB and transfer files to a local CIFS Share.
I have been able to script access to SPOnline to create new folder structures in the Site.
Where i am failing is connecting the two processes.
I have tried Add-PnPFile, Copy-PnpFile and Move-PnPFolder but it seems that I can only authenticate to one resource at a time which causes a failure of the process.
I figure that because this can be done manually, there should be an underlying Process/Utility that will provide access and all the functionality required.
Can anyone suggest a solution?
Many thanks