Load Active Directory Powershell Module Windows 10

  1. Install Active Directory Powershell Module Windows 10 1809
  2. Load Active Directory Powershell Module Windows 10 Free

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. How to add Active Directory module in PowerShell in Windows 8? Ask Question Asked 4 years. Select AD DS and AD LDS Tools and then select Active Directory Module for Windows PowerShell. To turn off specific tolos. The module will automatically load when needed if it is installed. This has been the case with PowerShell 3.0 and up. In Windows 10, Windows 8.1, and Windows 7, to install the RSAT-AD-PowerShell module, you must first install the appropriate version of RSAT, then you need to enable the module (Control Panel Programs Turn Windows Features On or Off Remote Server Administration Tools Role Administration Tools AD DS and AD LDS Tools Active Directory. The Active Directory module for Windows PowerShell is a PowerShell module that consolidates a group of cmdlets. You can use these cmdlets to manage your Active Directory domains, Active Directory Lightweight Directory Services (AD LDS) configuration sets, and Active Directory Database Mounting Tool instances in a single, self-contained package.

Today I share a script to automate all of the manual steps involved with setting up the Active Directory PowerShell module on your Windows 10 workstation.

Clickety, Click. Scripty, script.

I recently reloaded my everyday work laptop. After three years it had in-place upgrades from Windows 8 to Windows 8.1 to Windows 10. You can imagine that we dogfood a lot of software as Microsoft employees, so it was well past time for a reload.

As part of this I had to set up the Active Directory module. Since the process was more than one quick step, I decide this deserves a script to help everyone else in the world as well. How many steps does it take?

  • Find and download the CPU-architecture-appropriate Windows 10 RSAT package (Remote Server Administration Tools)
  • Install the RSAT
  • Enable the Active Directory PowerShell feature
  • Update-Help for the AD module

This is mostly a one-time task, except for updating the module help. Generally I only script things that are more repeatable. However, I know many of you like to reload your laptop on a regular basis. I also know that lots of people are deploying Windows 10 right now. So this seemed like a good community service project.

The Script

This script needs to run from an elevated ISE or console session, since it is configuring your system. Obviously it will only run on Windows 10, because that is the goal.

Like any good PowerShell scripter I borrowed code from various sources on the internet. I included comments with the links where I found handy code for downloading a file, installing a hotfix, etc.

Rather than explain the entire script line-by-line, I’ll provide the interesting parts here with comments. DO NOT copy/paste/run the code below. It is not complete. Use the download link at the bottom of this post to get a copy of the full script.

I turned this into a function with full help and verbose output. I always like watching the blue verbose scroll as PowerShell runs. You get that sense of satisfaction that everything in the world is good when you watch your own code perform. #nerdthrills

Download

You can find the code here on the TechNet Script Gallery. Enjoy!

This guide explains how to install the Active Directory (AD) module for PowerShell Core 6.0 and Windows PowerShell. For Windows PowerShell, the tutorial describes how to install the AD module for Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008 R2, Windows Server 2012 R2, and Windows Server 2016.

Michael Pietroforte

Michael Pietroforte is the founder and editor in chief of 4sysops. He has more than 35 years of experience in IT management and system administration.

Latest posts by Michael Pietroforte (see all)

  • Results of the 4sysops member and author competition in 2018 - Tue, Jan 8 2019
  • Why Microsoft is using Windows customers as guinea pigs - Reply to Tim Warner - Tue, Dec 18 2018
  • PowerShell remoting with SSH public key authentication - Thu, May 3 2018

The installation of the AD module varies significantly for the different Windows and PowerShell versions. At the time of this writing, the AD module that comes with RAST does not work with PowerShell Core 6.0. However, this guide explains how you can manage Active Directory from PowerShell Core even on macOS and Linux.

Windows 7 ^

On a Windows 7 computer, you can follow this procedure to install the Active Directory module:

  1. Download the Remote Server Administration Tools (RSAT) for Windows 7.
  2. Open the Control Panel, start typing features, and then click Turn Windows features on or off.
  3. Scroll down to Remote Server Administration Tools and enable the Active Directory Module for Windows PowerShell in Remote Server Administration Tools > Role Administration Tools > AD DS and AD LDS Tools.
  4. Run Import-Module ActiveDirectory on a PowerShell console.

Active Directory Module for Windows PowerShell on Windows 7

If the Windows 7 machine only has PowerShell 2.0 installed, you have to add the Import-Module ActiveDirectory command to your profile because PowerShell doesn't load modules automatically. For instance, you can import the module in %UserProfile%My DocumentsWindowsPowerShellprofile.ps1. Makes sure you've set your execution policy to either RemoteSigned or Unrestricted: Set-ExecutionPolicy RemoteSigned.

Another option is to open the module from the Administrative Tools folder in the Control Panel.

Active Directory Module in Administrative Tools

Saw Saw II: Flesh & Blood is a third person survival horror game and the second video game set in the Saw franchise. It was developed by Zombie Studios and published by Konami. The game launched on the PlayStation 3 and Xbox 360. Oct 19, 2010  SAW II: Flesh & Blood is a third-person puzzle/survival horror video game developed by Zombie Studios and published by Konami under the license of Lionsgate, the owner of the rights to the SAW franchise. It was released for PlayStation 3 and Xbox 360 in 2010. Saw flesh and blood game.

Windows Server 2008 R2 ^

If your Windows Server 2008 R2 machine is a domain controller, the PowerShell Active Directory Module is already installed. You only have to install the module on member servers. The procedure on Windows Server 2008 R2 is similar to that on Windows 7. (Note that the module is not available for Windows Server 2008.)

One difference is that you don't have to download RSAT because the tools are already available on Windows Server 2008 R2.

  1. In Server Manager, click Add features, and then:
  2. Select Active Directory module for Windows PowerShell in Remote Server Administration Tools > Role Administration Tools > AD DS and AD LDS Tools.

Alternatively, you can install the module from a PowerShell console:

Import-Module ServerManagerAdd-WindowsFeature RSAT-AD-PowerShell

After copying the module to your computer, you have to import it:

Or you can right-click the PowerShell icon on the taskbar and select Import system modules.

Import system modules

As on Windows 7, if you want to make the import permanent, you have to add the above import command to your PowerShell profile. Notice this description assumes you haven't updated PowerShell 2 on your Windows Server 2008 R2 machine (see the description about Windows 7).

Windows 8, Windows 8.1, Windows 10 ^

Things are a lot easier in Windows 8, Windows 8.1, and Windows 10. All you have to do is download and install RSAT (Windows 8, Windows 8.1, Windows 10). The installation enables all tools by default, and you also don't have to import the module. You can use the AD module right away after you install RSAT.

Windows Server 2012, Windows Server 2012 R2, Windows Server 2016 ^

As on Windows Server 2008 R2, the AD module is already installed on domain controllers on Windows Server 2012, Windows Server 2012 R2, and Windows Server 2016. On member servers, you can add the module as a feature in Server Manager.

  1. Start Server Manager.
  2. Click Manage > Add Roles and Features.
  3. Click Next until you reach Features.
  4. Enable Active Directory module for Windows PowerShell in Remote Server Administration Tools > Role Administration Tools > AD DS and AD LDS Tools.

Alternatively, you can install the module from a PowerShell console:

Installing the AD module on Windows Server 2012 with PowerShell

There's no need to import the Server Manager module first, as on Windows Server 2008 R2. You also don't have to import the AD module after the installation.

If you want to verify the successful installation of the module, you can just run the Get-ADuser cmdlet.

Install the AD module on PowerShell Core 6.x on a Windows computer ^

  1. Install RSAT with the method matching to your operating system (see sections above).
  2. Install the WindowsCompatibility module.
  3. Load the WindowsCompatibility module like usual with the Import-Module cmdlet
  4. Load the ActiveDirectory module with the Import-WinModule cmdlet

All versions: Import the ActiveDirectory module remotely ^

Create an interactive remote session

The simplest option is to create an interactive remote session to your domain controller with the Enter-PSsession cmdlet:

You can then work right away with the AD cmdlets. This option is good if you only occasionally manage AD on a PowerShell console and if you don't have to execute local scripts.

Managing Active Directory on PowerShell Core in an interactive remote session

Import the AD module from a remote session

The second option uses implicit remoting and allows you to run the AD cmdlets from a local session. However, you execute the AD cmdlets remotely on a domain controller. In practice, you won't notice much of difference in locally installed cmdlets. To import the AD module on PowerShell Core 6.0, execute these commands:

Export the remote AD module to a local module

Install Active Directory Powershell Module Windows 10 1809

Alternatively, you can export the AD cmdlets from a remote session to a local module:

RemoteAD module automatically. However, the downside to this option is you might have to repeat the procedure after updating the AD module on the domain controller.

PowerShell Core and Windows PowerShell modules ^

Note that you can use Windows PowerShell together with PowerShell Core on the same machine and work with the different AD modules in both shells. If you installed RSAT, the AD module for Windows PowerShell will reside in this folder:

$env:windir/System32/WindowsPowerShell/v1.0/Modules/ActiveDirectory

If you used the export solution, the RemoteAD module will be in this folder:

Powershell

$env:userprofile/Documents/PowerShell/Modules/RemoteAD

PowerShell Core and Windows PowerShell use different folders

PowerShell Core does not import modules in WindowsPowerShell folders, and Windows PowerShell does not load PowerShell Core modules, which are always in PowerShell folders. Thus, you don't have to worry about conflicts between the different AD modules in PowerShell Core and Windows PowerShell.

Conclusion ^

Using the Active Directory module has become simpler with each PowerShell version up to Microsoft's release of PowerShell Core 6.0. However, working with implicit remoting and remote sessions has various advantages. One advantage is that you can use disconnected remote sessions. This allows you to start a script, shut down your client computer, and retrieve the results from the remote machine later. If you often work with remote sessions, you should become familiar with the different ways you can use PowerShell remote sessions. Once you get used to working with remoting, you probably won't miss the local AD module for PowerShell Core.


Load Active Directory Powershell Module Windows 10 Free

Users who have LIKED this post: