Reputation: 798
I'm playing around with IIS and Windows PowerShell, and based on this this Microsoft TechNet link I should be able to view all optional features for my OS with the PowerShell command:
PS C:\> Get-WindowsOptionalFeature –Online
When I try to use this command, I get this error message:
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
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?
Upvotes: 6
Views: 13513
Reputation: 5584
Upvotes: 7