Disappointing that people can't answer the actual question raised by the OP but provide alternative mechanisms instead.
While these may well work, they don't help people understand the underlying cause.
This particular issue appears to be the RetentionPolicyTagLinks parameter takes a specific object type so cannot handle a hash table as input, but perhaps someone can suggest methods to cast to different object types with PowerShell?