title: Calling Lync server 2010 Powershell cmdlets from C#
body: <p>I have to ask that do we need to run  </p>
  
  <p>pipeline.Commands.AddScript(@"Import-Module 'C:\Program Files\Common Files\Microsoft Lync Server 2010\Modules\Lync\Lync.psd1'");</p>
  
  <p>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. </p>
  
  <p>RunspaceConfiguration.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.E2010", out warning);</p>
  
  <p>And also what assembly references we need to add in C# project for Lync Server Powershell cmdlets (besides System.Management.Automation.Runspaces)</p>
  
  <p>Thanks in advance.</p>