Answered by:
Add-WindowsFeature, Get-WindowsFeature modules not recognized in powershell.

Question
-
Hi, I have several Windows Server 2008 R2 servers running in a test lab environment. I have installed the RTM version of 2008 r2. I am building an exchange 2010 lab to test out the new features in it. I was doing some troubleshooting on some of the exchange processes and ran across a page using the Add-WindowsFeature cmdlet in powershell. However when I type in that command in powershell I get a message that says:
The term 'Add-WindowsFeature' is not recognized as the name of a cmdlet, function, script file, or operable program. Ch
eck the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:19
+ Add-WindowsFeature <<<<
+ CategoryInfo : ObjectNotFound: (Add-WindowsFeature:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I am also getting the same message with the Get-WindowsFeature command.
What do I need to do on these servers to fix this?
Thanks.Tuesday, February 2, 2010 4:14 PM
Answers
-
You first need to run:
PS>import-module servermanager- Proposed as answer by Marco Shaw Tuesday, February 2, 2010 4:18 PM
- Marked as answer by Fadedcrimson Tuesday, February 2, 2010 4:30 PM
Tuesday, February 2, 2010 4:18 PM
All replies
-
You first need to run:
PS>import-module servermanager- Proposed as answer by Marco Shaw Tuesday, February 2, 2010 4:18 PM
- Marked as answer by Fadedcrimson Tuesday, February 2, 2010 4:30 PM
Tuesday, February 2, 2010 4:18 PM -
That did it. What I want to know is why 3 hours of searching for that answer to that question is that isn't listed anywhere as having to use that command before you use Add-WindowsFeature or Get-WindowsFeature.
Anyways thanks for helping!Tuesday, February 2, 2010 4:31 PM -
That did it. What I want to know is why 3 hours of searching for that answer to that question is that isn't listed anywhere as having to use that command before you use Add-WindowsFeature or Get-WindowsFeature.
Anyways thanks for helping!
A valid question that I can't exactly help to give an official answer. That's how non-core-OS PowerShell features are added in v2. Same for AD, IIS, Clustering, etc.Tuesday, February 2, 2010 4:34 PM -
Well - and in way that makes sense to make powershell more flexible and dynamic. But so far I haven't really found any documentation relating which functions belong under which module blocks. Oh well, I guess it all is still pretty new.Tuesday, February 2, 2010 4:46 PM
-
Hi,
For your information, expert from the article below:
"You must load the Server Manager module into each new Windows PowerShell session before working with Server Manager cmdlets. To do this, in a Windows PowerShell session opened with elevated user rights, type Import-Module Servermanager, and then press ENTER."
What's New in Server Manager
http://technet.microsoft.com/en-us/library/dd378896%28WS.10%29.aspxThanks.
This posting is provided "AS IS" with no warranties, and confers no rights.Wednesday, February 3, 2010 1:51 AM -
You first need to run:
PS>import-module servermanager
can not run nor the features
PS C:\Users\Administrator> import-module servermanager
Import-Module : The specified module 'servermanager' was not loaded because no valid module file was found in any modul
e directory.
At line:1 char:14
+ import-module <<<< servermanager
+ CategoryInfo : ResourceUnavailable: (servermanager:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommandPS C:\Users\Administrator> Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Met
abase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compress
ion,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart
The term 'Add-WindowsFeature' is not recognized as the name of a cmdlet, function, script file, or operable program. Ch
eck the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:19
+ Add-WindowsFeature <<<< NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,
Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Acti
vation,RPC-Over-HTTP-Proxy -Restart
+ CategoryInfo : ObjectNotFound: (Add-WindowsFeature:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionguide please
Wednesday, February 1, 2012 12:52 AM -
You can list what modules are available by running:
get-module -list
ModuleType Name ExportedCommands
---------- ---- ----------------
Manifest ActiveDirectory {}
Manifest AppLocker {}
Manifest BitsTransfer {}
Manifest PSDiagnostics {}
Manifest TroubleshootingPack {}I am on Win7 x64 SP1, so I do not have the server manager.
Wednesday, February 1, 2012 1:47 PM -
Thanks Marco :D Solved :D
Tuesday, December 18, 2012 8:39 AM -
is this issue really resolved ??
we are hitting same issue again ..
please reply the solution
Nilesh Savant
Wednesday, June 10, 2015 3:06 PM -
This thread has been closed for 5 years. You need to start your own topic.
\_(ツ)_/
Wednesday, June 10, 2015 3:35 PM -
i have did but still same problem
PS C:\> import-module servermanager
PS C:\> install-windowsFeature AS-HTTP-Activation
Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True No NoChangeNeeded {}
PS C:\> install-windowsFeature AS-HTTP-Activation
Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True No NoChangeNeeded {}
PS C:\> Desktop-Experience
Desktop-Experience : The term 'Desktop-Experience' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ Desktop-Experience
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Desktop-Experience:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
wd
Tuesday, May 3, 2016 10:49 AM -
You have to install Desktop Experience feature .
Install-WindowsFeature Desktop-Experience
Tuesday, May 3, 2016 11:11 AM -
Hi wd786,
This thread is closed. Please put your question in a new thread.
Tuesday, May 3, 2016 11:20 AM -
i have tried all From install-windowsFeature to windows-identity-foundation but still error
PS C:\> RPC-over-HTTP-proxy
RPC-over-HTTP-proxy : The term 'RPC-over-HTTP-proxy' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
+ RPC-over-HTTP-proxy
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (RPC-over-HTTP-proxy:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
wd
Tuesday, May 3, 2016 11:45 AM -
Putting this question on a new thread will attract more attention. Please put this on a new thread.Tuesday, May 3, 2016 12:30 PM
-
how to submit in new thread ????
wd
Wednesday, May 4, 2016 5:41 AM -
Hi wd786 !!
could it be, that you´ve startet the "wrong" powershell ?
i had the same problem like you.. i startet the PowerShell x86 located in Start>All Programs>Administrative Tools>Windows PowerShell (x86).
scroll a little bit more down to the "Windows System" dir and open the very normal "Windows PowerShell".
this also opens the SAME PowerShell, but i think with different parameters. looks like the (x86)-Version does not have those important commands.
good luck and friendly greetings from austria ;-)
Friday, August 19, 2016 11:58 PM -
I change into the Admin Role and install the feature successful.Saturday, August 12, 2017 9:08 AM
-
Import-Module : The specified module 'servermanager' was not loaded because no valid module file was found in any modul
e directory.
At line:1 char:14
+ import-module <<<< servermanager
+ CategoryInfo : ResourceUnavailable: (servermanager:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommandMathew Edlund
Tuesday, October 17, 2017 3:56 PM -
Actually I tried running the command Install-WindowsFeature and I got the same error, then tried running import-module servermanager as recommended to fix it and I got the following error.
import-module : The specified module 'servermanager' was not loaded because no
valid module file was found in any module directory.
At line:1 char:1
+ import-module servermanager
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (servermanager:String) [Import
-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Command
s.ImportModuleCommand.Any help?
Friday, November 24, 2017 2:50 PM -
I would check if you are running the x86 version of power shell, try using the x64Saturday, December 23, 2017 7:50 AM
-
Try installing this:https://www.microsoft.com/en-au/download/details.aspx?id=45520Tuesday, May 28, 2019 1:07 PM
-
Are you sure you are running the x64 bit version of PowerShell?
The Term ‘Uninstall-WindowsFeature’ is not Recognized
Pete
Regards Pete Long http://www.petenetlive.com
Monday, December 16, 2019 9:22 AM -
Please refrain from adding ambiguous answers to topics that have ben answered and closed. This topic was answered 110 years ago. your answers are not helpful.
\_(ツ)_/
Monday, December 16, 2019 11:35 AM