Created a PowerShell Cmdlet command in C# and am trying to get the output after passing parameters. The function runs perfectly if I run it as a console application and I ge