This script is part of a project for me to refactor and merge some of the one off scripts that I've written. I've had several instances where I've needed to upload a folder of backups/configs/reports to SharePoint and I've just been copy and pasting a tiny script I wrote a year ago to get it to work. This isn't a great practice so I took some free time and consolidated them to one file that can be adjusted with environmental variables. It's intended to be called from a scheduler and has been pretty reliable. However, I did eventually discover rclone, and that's been my goto since.