This is a parameterized script that will perform bulk uploads of files from your local file system to SharePoint remotely. This script uses CSOM and will maintain your existing file and folder structure, as it exists on your local file system.
Usage is relatively simple: .\BulkUploadSharePointCSOM.ps1 -UserName "email@example.com" -Password "SomePassword" -SiteURL "https://MyO365Site.sharepoint.com" -DocLibName "Documents" -Folder "D:\MyFolder\SomeSubfolder"
The purpose of this script is to provide an automated method to upload files from multiple accessible sources to your on-premesis SharePoint environments. Doing so against SharePoint Online (O365) is not recommended due to the chatty nature of the communication. As the client side object model can be used in both on-premesis SharePoint and SharePoint Online, this can effectively be used in either scenario
This script cannot be used as a way to circumvent any throttling that is applied to the client-side object model. The purpose of this script is to allow an automated alternative to the manual methods described in this article:
For more information regarding throttling in SharePoint Online, see the following article:
Blog to follow in the near future