Running a powershell command in C# errors with, “Cannot invoke this function because the current host does not implement it”
I have an application that I use to run Exchange Powershell commands inside C# code like below. This is an example of the relevant lines I use to run the powershell command.