Pipe character from PowerShell string command is not recognized in Csharp C# code
It works if I add additional quotes:
var cmd2 = client.CreateCommand( "powershell.exe -executionPolicy bypass; " + "\"Get-Process notepad | Stop-Process\"; " + "exit ;");