title: Adding features in Windows 2008 Server R2 in Server Manager programmatically
body: <p>I am writing a program that needs .NET to run.
  When I run it on Windows 2008 Server R2 it fails upon .NET 3.5 installation.
  This is because in this version of Windows you can only install .NET 3.5 via Server Manager (or Role Manager).</p>
  
  <p>I was wondering if there is a way to do it programmatically?</p>
  
  <p>I searched the web and found that maybe I could use PowerShell or WMI. I hoped that someone here could verify that that's the way to go, and if not, point me in the right direction.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>From further investigation I found that using WMIs Win32_ServerFeature_ID class I can enumerate the existing features. But I cannot find any explanation as to how to add a new feature.</p>
  
  <p>Help very much needed.</p>
  
  <p>Thanks.</p>