title: How to get front end servers from sharepoint 2010 farm
body: <p>I have an requirement of getting the front end web server in SharePoint farm.This is the code for getting it.</p>
  
  <pre><code>SPFarm myFarm = SPFarm.Local;
  SPServerCollection serverColl = myFarm.Servers;
  if (serverColl != null &amp;&amp; serverColl.Count &gt; 0)
  {
  foreach (SPServer spserver in serverColl)
  {
    //get exceute
  }
  }
  </code></pre>
  
  <p>May I know this the appropriate way to achieve this or any other suitable way to achieve it ?</p>