17

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

diegus
  • 283
  • 1
  • 3
  • 7

3 Answers3

21

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

Kieren Dixon
  • 336
  • 2
  • 3
5

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

Istvan
  • 2,582
  • 3
  • 22
  • 29
3

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 'wuauserv'

# 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 'wuauserv'

# (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

If you have policies that are pushing Windows Update settings to the correlated registry keys, giving it a reboot afterwards should put any changes back in place if they were adjusted with this solution.

Pimp Juice IT
  • 1,077
  • 1
  • 9
  • 16
JohnLBevan
  • 1,214
  • 7
  • 22
  • 46
  • I'm getting `Cannot find path 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU' because it does not exist.` on the first line. Windows 10 Pro x64 v1909 (18363.1379) – v.karbovnichy Feb 20 '21 at 20:07