I'm working on automating the OneDrive setup for new computers, and I'm new to this kind of thing.
I need to automate the Sharepoint shared library setup on the user computer. This way the user has all the shared librairy in the Windows file explorer. This Sharepoint is provided with our Office365 account.
I read the Microsoft documentation and build the URL with the necessary data needed as explained in the part “Auto-configure SharePoint site synchronization”.
But there is a problem in my powershell script that I don't understand.
When I run the powershell command Start-Process "odopen://sync/?siteId[...]"
, the OneDrive window opens and I have to set up the account. But at the end of the process, the only thing synchronised with OneDrive is the user's personal (business) OneDrive, and not the shared librairy.
The folder created by OneDrive is : C:\Users%username\OneDrive -
And the one I want to have is : C:\Users%username<tenant name><Shared Librairy>
It's like OneDrive doesn't care about all the parameters passed in the URL.
FYI, I run this script in a fresh Windows 10 VM.
Thanks for your help