13

I am running windows 10 on a virtual machine and I would like to list the windows feature available by running the following commands on powershell:

Import-Module ServerManager
Get-WindowsFeature

Already running the first command produces: The specific module 'servermanager' was not loaded because no valid module file was found in any module directory.

I have tried to use the solution for Windows server 2008 Powershell Servermanager module not included in Windows Web Server 2008 R2 but that does not work for me, i.e. I cannot find the module in C:\Windows\System32\WindowsPowerShell\v1.0\Modules. Yet, I could not find how to switch between 64bit or 32bit Powershell in Windows 10. Any help? thank you

19

You need to download and install 'Remote Server Administration Tools for Windows 10'. The download link is https://www.microsoft.com/en-au/download/details.aspx?id=45520

RSAT tools on Windows 10 October 2018 Update or later

Starting with Windows 10 October 2018 Update, RSAT is included as a set of "Features on Demand" right from Windows 10. Do not download an RSAT package from this page. Instead, just go to "Manage optional features" in Settings and click "Add a feature" to see the list of available RSAT tools. Select and install the specific RSAT tools you need. To see installation progress, click the Back button to view status on the "Manage optional features" page.

Optional features - Add a feature - RSAT: Server Manager

| improve this answer | |
  • Which RSAT tool do I need? – AlxVallejo May 26 at 22:29
  • @AlxVallejo: You need "RSAT: ServerManager" to do Import-Module ServerManager. – Nick Westgate Jun 9 at 7:14
5

You can use the x86 tag to identify which PS version you are starting up. See following picture: enter image description here

| improve this answer | |
  • Thank you for the tip. However, I have tried to look into the 32bit version of Powershell but still I cannot run/find the 'servermanager' module... – diegus Feb 17 '16 at 11:12
  • You need the 64bit version. – Istvan Feb 17 '16 at 12:07
  • It is not true for me, I run Get-Module -ListAvailable on 64bit version of PS and the module I need is not on the list. – diegus Feb 20 '16 at 7:42
  • 1
    So non of the installations (32 & 64? has this module? – Istvan Feb 20 '16 at 8:52
  • 1
    Exactly, non of them (32bit and 64bit) has it. – diegus Feb 20 '16 at 9:29
0

An addendum to Kieren Dixon's excellent answer, if when installing the required optional feature in Win10 you see not installed, you can complete the below steps (based on this blog post) to resolve the issue:

  • Run PowerShell as administrator.
  • Run the below commands
# make note of the current value, so we can reset it later
$UseWUServer = Get-ItemProperty 'HKLM:/Software/Policies/Microsoft/Windows/WindowsUpdate/AU' 'UseWUServer'

# ensure when we fetch properties we're pulling from MS; not some internal server which may not have the solution we need
Set-ItemProperty 'HKLM:/Software/Policies/Microsoft/Windows/WindowsUpdate/AU' 'UseWUServer' 0

# restart the windows update service so our change takes effect
Restart-Service 'wuaserv'

# install the required feature(s)
@(
    'RSAT.ServerManager.Tools*' 
    'RSAT.ActiveDirectory.DS-LDS.Tools*' 
) |
    ForEach-Object { Get-WindowsCapability -Name $_ -Online } |
    ForEach-Object { Add-WindowsCapability -Name $_.Name -Online }

# (optional) put things back how we found them
Set-ItemProperty 'HKLM:/Software/Policies/Microsoft/Windows/WindowsUpdate/AU' 'UseWUServer' $UseWUServer
Restart-Service 'wuaserv'

# (optional) Display the features
Get-WindowsCapability -Name 'RSAT.*' -Online | 
    Sort-Object State, Name |
    Format-Table Name, State, DisplayName -AutoSize

# (optional) Test the AD module (module should automatically be imported)
Get-AdUser $env:USERNAME

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.