none
How to make Get-ADUser PowerShell commandlet available on a domain joined server

    Question

  • Hello,

    I need to run Get-ADUser on a domain joined server on a scheduled basis.

    The  server does not have the role Domain Controller installed on it. Therefore 'import-module activedirectory' will fail on the server.

    How can I have Get-ADUser (in activedirectory module) PowerShell commandlet available on the server?

    The server is doing other services so the least amount of changes would be preferred.

    Thank you,

    Tuesday, March 21, 2017 2:48 AM

Answers

  • Hi,

    Installing the module from a PowerShell console on member servers:

    Import-Module ServerManager

    Add-WindowsFeature RSAT-AD-PowerShell

    After the module has been copied to your computer, you have to import it:

    Import-Module ActiveDirectory

    Best Regards,

    Alvin Wang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Proposed as answer by Richard MuellerMVP Tuesday, March 21, 2017 9:44 AM
    • Marked as answer by amx2012 Thursday, March 23, 2017 12:25 PM
    Tuesday, March 21, 2017 9:11 AM
    Moderator