4

I use Windows 8.1 and I try use Import-Module ActiveDirectory, but I get the following error:

PS C:\Windows\system32> Import-Module ActiveDirectory
Import-Module : No se cargó el módulo 'ActiveDirectory' especificado porque no se encontró ningún archivo de módulo
válido en ningún directorio de módulo.
En línea: 1 Carácter: 1
+ Import-Module ActiveDirectory
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (ActiveDirectory:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

How to add Active Directory module in PowerShell? What can I install to get Active Directory module ?

Maybe useful could be do all steps programmatically (perhaps using chocolatey or another)

4

STEP 1.) Download and install Remote Server Administration Tools (RSAT) for Windows 8.1 http://www.microsoft.com/en-us/download/details.aspx?id=39296

STEP 2.) For x64, install Windows8.1-KB2693643-x64.msu

STEP 3.) Active Feature

Select AD DS and AD LDS Tools and then select Active Directory Module for Windows PowerShell.

To turn off specific tolos

1.On the desktop, hover in the upper right corner of the screen, and then click Settings.
2.On the Desktop menu, click Control Panel.
3.Click Programs, and then in Programs and Features, click Turn Windows features on or off.
4.In the Windows Features dialog box, expand Remote Server Administration Tools, and then expand either Role Administration Tools or Feature Administration Tools.
5.Clear the check boxes for any tools that you want to turn off. Click OK, and then close Control Panel.

STEP 4.) Open a PowerShell prompt and type PS C:\> Get-Module –ListAvailable.

STEP 5.) To ensure the Active Directory Module is present, using PowerShell type PS C:> Import-Module ActiveDirectory.

NOTE: You will need to do this for every PowerShell session.

If you wish to have the Active Directory Module automatically loaded any time you run PowerShell, prepare a shortcut with the following content: %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command import-module ActiveDirectory

STEP 6.) PS C:> Get-ADGroupMember "MY CUSTOM GROUP IN AD" | select name

Appenders:

Installation and Uninstallation of MSU in silent mode http://msiworld.blogspot.com.es/2012/04/silent-install-and-uninstall-of-msu.html

Sources: https://support.software.dell.com/es-es/appassure/kb/117489
https://kiquenet.wordpress.com/2015/01/21/installing-powershell-active-directory-module-for-windows-8-1/

| improve this answer | |
  • The module will automatically load when needed if it is installed. This has been the case with PowerShell 3.0 and up. – Entbark Apr 2 '15 at 14:17

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.