set-cmcollection does not terminate on name collisions with errors in -errorvariable and doesn't seem to work with try/catch
If we could get this functionality it would go a long way in automating collection management.
AdminAdam Meltzer (ConfigMgr Product Team) (Software Engineer, System Center Configuration Manager) commented
Can you provide an example of what you're seeing versus what the expected behavior is for name collisions?
As far as the -ErrorVariable behavior, that may be by design due to how PowerShell works but I'd like more details about what you're seeing so I can confirm.