I\'m trying to write some C# code to interact with Lync using PowerShell, and I need to import the Lync module before executing the Lync cmdlets. However, my code doesn\'t s
Try to use the PowerShell class AddCommand method.
ps.AddCommand("import-module Lync");
Or you can use the Runspace class, you can find an example here : http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C