Gaetano Violante

Gaetano Violante

  • NA
  • 28
  • 1.2k

Hello everyone, I'm having some troubles with embedding PowerShell script into C# code using Visual ...

Oct 10 2012 8:24 AM
Hello everyone, I'm having some troubles with embedding PowerShell script into C# code using Visual Studio. PowerShell library has been added to the solution, and all works fine when I call (from C# code) simple commands like "date", "echo" and also when I have declaration of variables. Troubles arise when I use PowerShell commands for open a SharePoint website. The PowerShell command works finely if executed from the console, but not when called from C# code. I've tried to change the Visual Studio solution target framework, but the problem still persists. Any suggestion about that is really appreciated !!!