When running this in PS 5.1 the original script returns a warning that "WARNING: Cannot bind parameter because parameter 'Uri' is specified more than once. To provide multiple values to parameters that can accept multiple values, use the array syntax. For example, "-parameter value1,value2,value3"."
I'm not sure if this is version specific, but this version updates the URI in @MsiParams prior to calling Invoke-RestMethod. It works as intended.
When running this in PS 5.1 the original script returns a warning that "WARNING: Cannot bind parameter because parameter 'Uri' is specified more than once. To provide multiple values to parameters that can accept multiple values, use the array syntax. For example, "-parameter value1,value2,value3"."
I'm not sure if this is version specific, but this version updates the URI in @MsiParams prior to calling Invoke-RestMethod. It works as intended.