1
votes

I have to ask that do we need to run

pipeline.Commands.AddScript(@"Import-Module 'C:\Program Files\Common Files\Microsoft Lync Server 2010\Modules\Lync\Lync.psd1'");

each time we run a Lync Powershell Cmdlet or is there any way we can do it while initializing Runspace? As we do in Exchange server case e.g.

RunspaceConfiguration.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.E2010", out warning);

And also what assembly references we need to add in C# project for Lync Server Powershell cmdlets (besides System.Management.Automation.Runspaces)

Thanks in advance.

1

1 Answers

2
votes

Luckily I found the solution. And I posted it here.

Calling lync server cmdlets from c# .NET