I have a PR in for a fix for this. This actually reverts the functionality back to the 2.3 days. I used the “bad performance” example above and it clocked in under 3 seconds instead of 18.
I need to do some additional testing to make sure the scoping works the same but the New-UDEndpoint -ArgumentList should work just fine.
This will be in tonight’s nightly builds so please give it a shot if you have a couple minutes to spare.