3

Good afternoon! I need to add only the module rsat Active Directory module powershell in windows 10 Execute command: Enable-WindowsOptionalFeature -Online -FeatureName RSATClient-Roles-AD-Powershell But error:

Enable-WindowsOptionalFeature : Не удается прочитать параметр реестра.(Can not read the registry entry.)
строка:1 знак:1
+ Enable-WindowsOptionalFeature -Online -FeatureName RSATClient-Roles-A ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

If to apply parameter -All, all components are installed. How to solve a problem?

user3919982
  • 31
  • 1
  • 1
  • 2
  • 1
    assuming that you have russian windows you may try to ask your question on a russian SO: http://ru.stackoverflow.com/ – n01d Jul 13 '16 at 08:57

3 Answers3

2

These instructions are for Windows 7; the process will likely be similar for Windows 10.

  1. First, find and install the Remote Server Administration Tools (RSAT) update package for your version of Windows. I found this easily.

  2. Then, you'll need to enable the feature once it is installed.

    1. Go to Control Panel -> Programs and Features -> Turn Windows features on or off (or, open it directly, from the command line: %windir%\System32\OptionalFeatures.exe
    2. Find Remote Server Adminstration Tools -> Role Adiminstration Tools -> AD DS and AD LDS Tools -> Active Directory Module for Windows PowerShell, and turn it on

      Windows Features

    3. You may need to restart your computer. I don't recall.

  3. Finally, import the module, and use it normally.
jpaugh
  • 6,634
  • 4
  • 38
  • 90
1

At the top of your PowerShell script you just need to include the following.

Import-Module activedirectory

Assuming you have the RSAT tools already installed on the Win10 machines via Control Panel.

Paul Andrew
  • 3,233
  • 2
  • 17
  • 37
0

To install ActiveDirectory powershell module in Windows 10, you need to install RSAT. (Remote Server Administration Tools)

Achieve it with:

Settings (win + i) -> Apps -> Optional features -> Add a feature -> Select "RSAT: Active Directory Domain Services and Lightweight Directory Services Tools" -> Install

add an optional feature interface

After it Import-Module ActiveDirectory will work in powershell.

Roganik
  • 98
  • 1
  • 5