Invoke power shell issues that work correctly when running from power shell

Try that as well @covcreo,

Pass the entire command as variable and try.

one more thing , I hope you need to import any packages it seems