OneDrive renaming

That's the main one that's causing me issues.

But would be great to have a script to fix all (or even most). The other rules are:
(I've cut and pasted this from Microsoft's site)

  • Names beginning or ending with a space
  • Names ending with a period
  • Names containing unsupported Unicode code points
  • Names with surrogate pair issues

~ " # % & * : < > ? / \ { | }.

These names aren't allowed for files or folders: .lock , CON , PRN , AUX , NUL , COM0 - COM9 , LPT0 - LPT9 , _vti_ , desktop.ini , any filename starting with ~$ .

Notes:

  • " __vti__ " cannot appear anywhere in a file name (note this should be _vti (and another hyphon)
  • " forms " isn't supported when the folder is at the root level for a library.
  • You can’t create a folder name in SharePoint that begins with a tilde ( ~ ).