Fix powershell native command error output with Kubernetes executor

What does this MR do?

It changes the way we do command redirection to prevent powershell v5 from emitting a misleading "Native command error"

Why was this MR needed?

When we invoke the helper to upload artifacts, it uses the logger to print the success message that summarizes the number of files and directories included, and the logger sends that to stderr. Powershell v5.x detects that use of stderr and prints a complaint about "Native command error" even though the exit status is 0. I confess I don't fully understand the mechanism, but powershell detects this even though we've redirected stderr to stdout. It can be fixed by converting the output records to strings, apparently.. ?

I wouldn't have figured this out myself but there's a helpful stackoverflow question:

https://stackoverflow.com/questions/2095088/error-when-calling-3rd-party-executable-from-powershell-when-using-an-ide

What's the best way to test this MR?

I checked that the unwanted error is avoided with powershell, and that pwsh still works ok. I'm interested in suggestions for more rigorous testing.

What are the relevant issue numbers?

Closes #31086 (closed)

Edited by Arran Walker

Merge request reports

Loading