O365GroupSync Changelog:
V0.13: creation of groups both ways, autodetection of available domains on both sides
V0.14 02/09/2016 JosL: membership change support
V0.15 02/09/2016 JosL: group rename support
V0.16 02/09/2016 JosL: group deletion support
V0.17 04/09/2016 JosL: improved group caching to include 1 layer of members, added full/diff option
V0.18 05/09/2016 JosL: implemented ReadOnly and differential switches
V0.19 06/09/2016 JosL: full sync of group membership implemented without differential / cache
V0.20 09/09/2016 JosL: support for Contact and MailUser objects
V0.21 09/09/2016 JosL: proxyAddresses change support
V0.22 13/09/2016 JosL: delete cache after using it to prevent it being used twice
V0.23 20/09/2016 JosL: write allowed senders (groups or members) to groups upon creation
V0.24 23/09/2016 JosL: switched to Filter without object cache for performance
V0.25 23/09/2016 JosL: automatically add a displayName to an AD group based on CN if displayName is empty
V0.25 23/09/2016 JosL: visual progress indicator when caching AD or O365 groups in % and timeleft
V0.26 23/09/2016 JosL: detect and process changes to allowed senders
V0.27 23/09/2016 JosL: first create all groups, then process membership and sender auth
V0.28 25/10/2016 JosL: no auto elevation, just terminate with an error when not running elevated
V0.29 25/10/2016 JosL: added email notification function
V0.30 01/11/2016 JosL: added prefix filter for AD group selection
V0.31 07/11/2016 JosL: automated version check
V0.32 29/11/2016 JosL: reduce severity from error to warning when member of group cannot be found
V0.32 30/11/2016 JosL: 2 new functions to replace Compare-Object, as this wasn’t performing well
V0.33 30/11/2016 JosL: new O365 caching method, direct lookups were too slow
V0.34 02/12/2016 JosL: fixed cache compare with new function names, improved lookup of AD users with smtp: prefix to avoid false positives
V0.35 05/12/2016 JosL: bugfixes, improved logging (filter), new parameter: skipDisabledAccounts, better progress indicators
V0.36 05/12/2016 JosL: revamped O365 cache with special fast lookup hashtable to increase performance, implemented use of this new cache hash table
V0.37 06/12/2016 JosL: added debug mode, don’t count version mismatch as double error
V0.38 08/12/2016 JosL: re-cache O365 Objects after creating groups, so nested groups get nested right away instead of at next run
V0.39 13/12/2016 JosL: returnChangedMembersInADGroups function optimized
V0.40 13/12/2016 JosL: implemented .NET streamwriter vs add-content to avoid file locking issues of the logfile
V0.41 13/12/2016 JosL: implemented fastSearch cache in both group retrieval functions to reduce time needed to compare group members
V0.42 13/12/2016 JosL: changed full/differential switches, full = run a full, differential = run a differential, no longer exclude one another
V0.43 13/12/2016 JosL: allow X500 addresses to sync at initial creation
V0.44 20/12/2016 JosL: remove SMTP prefix when searching the fastsearch cache, as these are saved without a prefix
V0.44 20/12/2016 JosL: removed log spam about skipping inactive accounts
V0.45 29/12/2016 JosL: when creating O365 groups, set managedBy after creating all groups (in case a group is an owner this prevents the group not being found yet)
V0.46 03/01/2017 JosL: adjusted mail parameters to optionally only email when there are issues, or changes, or always
V0.47 17/01/2017 JosL: send error mail if log file is locked and causes a crash. Process renames before anything else in a differential sync
V0.48 17/01/2017 JosL: reconnect to Exchange Online each time we’re caching objects, fixed a bug in detecting Deleted Groups on both sides
V0.49 17/01/2017 JosL: moved all non-creation processing steps for AD groups to post-processing function, overwrite primary smtp instead of updating when going from AD->O365
V0.50 17/01/2017 JosL: set mailNickName and LegacyExchangeDN properties when creating group in AD so exchange picks it up in the list
V0.51 31/01/2017 JosL: actually send email notification if logfile is locked, prevent running twice (autokill other same script PS processes)
V0.52 07/02/2017 JosL: use Set-ADGroup vs Add-ADGroupMember and Remove-AdGroupMember as the latter don’t support contacts in certain situations (undocumented issue:
V0.53 13/03/2017 JosL: multi-delete protection, prevents deletion of all groups and forces manual action by admin
V0.54 03/04/2017 JosL: retry if membership retrieval of an Office 365 group fails and remove previous sessions when reconnecting to O365 ExO
V0.55 11/04/2017 JosL: clear hint about how to use multiple recipients for mail notification, custom ExO session health / reconnect function
V0.56 15/05/2017 JosL: group selector expanded to optionally select based on the extensionattribute in AD/O365 as an alternative to the display name prefix. Update all your groups before using this if you’re switching to this mode

Office 365, Azure, Enterprise Mobility and DevOps