Second SMTP address is not added to Exchange Groups due to conversion error

I am using this script https://gallery.technet.microsoft.com/Distribution-Group-Report-d32c4788 to import distribution groups from Exchange 2016 crossforests. Everything is working including Contacts creation, adding and Primary SMTP address setup, except secondary smtp addresses are not working. I am getting the following error:

I would appreciate help from anyone

Exception setting “EmailAddresses”: “Cannot convert value “System.Object[]” to type “Microsoft.Exchange.Data.ProxyAddressCollection”. Error: “Conversion from System.Management.Automation.PSObject to
Microsoft.Exchange.Data.ProxyAddress has not been implemented.””
At C:\CrossForestMigration\Groups\DistributionGroupImportFrom.ps1:268 char:8

  • … $GroupToUpdate.EmailAddresses = $GroupToUpdate.EmailAddre …
  • CategoryInfo : NotSpecified: (:slight_smile: [], SetValueInvocationException
  • FullyQualifiedErrorId : ExceptionWhenSetting

 

how are you executing the script, what all are the inputs provided ?

btwn can you try posting this in the script QnA: https://gallery.technet.microsoft.com/Distribution-Group-Report-d32c4788/view/Discussions#content

[quote quote=165751]how are you executing the script, what all are the inputs provided ?

btwn can you try posting this in the script QnA: https://gallery.technet.microsoft.com/Distribution-Group-Report-d32c4788/view/Discussions#content

[/quote]
I use the following parameters

DistributionGroupExportImport.ps1 -Mode Import -Filename C:\file.csv -CreateContactsForMissingRecipients

I got in contact with the coder , he replied me once by email but stopped after.