@wobba - Thanks for sharing this script and for your blog posting here.
I have a use-case where I need to map approximately 90 crawled properties to a single Search managed property at a tenant-level in SP2013 and SPO. I've checked the published Search Limits and it looks like it caps out at 100 crawled properties that can be mapped to a single managed property (besides other limits which I anticipate to be well within). Presently, the key challenge appears to be manual nature of the task at hand and the tedious and slow UX process and multiple clicks required to map all these taxonomy crawled properties to managed properties.
Are you aware of an automated way to do this mapping through script / code? In case not, and if we do the mapping once in SP2013, could an export and import of the search configuration from on-premises work as expected to SPO or will the mapping need to be re-applied in SPO manually?