Forum Discussion
How to uploads files to OneDrive for Business using Powershell
Hi, I tried this script but getting below error:
Exception calling “ExecuteQuery” with “0” argument(s): “The sign-in name or password does not match one in the Microsoft account system.”
But the account do exists.
The account is working if I login through webportal.
Hello, I get the same error.
This worked 'previously' ( until about February this year ).
I am having the same issue with uploading to sharepoint teams sites.
I have tried every piece of code and uploader I could find in the last 2 weeks and nothing is working.
- FlinxDec 18, 2019Copper Contributor
I had to modify this line to make it work
$FileCreationInfo.URL = $File
to this
$FileCreationInfo.URL = $ServerRelativeUrlOfRootFolder + "/" + $File.NameThis needs to be a web relative url and not the file path.
Its should equate to something like:
/personal/your_name_domain_com/Documents/Filename.txt
- Shintaro8088Jan 19, 2024Copper Contributor
How do I use your great code and make it so it that allow me to download users' onedrive for business data to my local drive?
Thanks