title: Get-WindowsOptionalFeature Failing to Work
body: <p>I'm playing around with IIS and Windows PowerShell, and based on this <a href="https://technet.microsoft.com/en-us/library/mt575519(v=wps.620).aspx" rel="noreferrer">this Microsoft TechNet link</a> I should be able to view all optional features for my OS with the PowerShell command:</p>
  
  <pre><code>PS C:\&gt; Get-WindowsOptionalFeature –Online
  </code></pre>
  
  <p>When I try to use this command, I get this error message:</p>
  
  <pre><code>get-windowsoptionalfeature : An attempt was made to load a program with an incorrect format.
  At line:1 char:1
  + get-windowsoptionalfeature -Online
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : NotSpecified: (:) [Get-WindowsOptionalFeature], COMException
  + FullyQualifiedErrorId : Microsoft.Dism.Commands.GetWindowsOptionalFeatureCommand
  </code></pre>
  
  <p>I've been reading around and most issues seem to be based on problems between 64-bit and 32-bit OS's, I've tried running it in both my standard PowerShell and PowerShell (x86), same error in both. Any ideas on why this is happening?</p>