First of all: Great script, thanks! :)
Although Microsoft original PST Collection Tool is full of bugs (unfortunately) these PowerShell scripts are a life saver when migrating lots of PSTs to Office 365.
Unfortunately the scripts can not handle filepaths longer than 260 characters (Microsofts PST Collection Tool does support this), which in my case results in not all PSTs being found. I know this is a limitation of Windows, but still.
The following error is logged when filepaths are too large:
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Would it be possible to add support for long filepaths?