This is based on the information from https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/bulk-user-profile-update-api-for-sharepoint-online
This script IS NOT copy-and-paste ready! You will need to review the end of the script to update paths, maybe someday I'll have this as it's own "module". I am utilizing this as a scheduled task in Windows for a client so we are using this in a single file.