Reputation: 41
When i type the command Get-WindowsFeature
in PowerShell 5 it displays this error, and I don't know why!
Get-WindowsFeature: The term "Get-WindowsFeature" is not recognized as a cmdlet name,
function, script file or executable program. Check the spelling of the name, or if a path
access exists, verify that the path is correct and try again.
To the character Line: 1: 1
+ Get-WindowsFeature
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo: ObjectNotFound: (Get-WindowsFeature: String) [], CommandNotFoundException
+ FullyQualifiedErrorId: CommandNotFoundException
Upvotes: 4
Views: 3161
Reputation: 1
make sure that you not trying to access Get-ImportModule through Powershell(x86). It's not there. Use the regular Powershell and you will be fine.
Upvotes: 0
Reputation: 3154
Get-WindowsFeature is not part of PowerShell 5, but of the Server Manager
module, which is either not installed or loaded, because the error message clearly states, that the command you trying to execute is not available.
Use Import-Module ServerManager
to import it, or Import-Module -ListAvailable
to see if it's even installed.
Upvotes: 4