简体   繁体   中英

Should active directory module for powershell installed on a windows 7 machine to import it or can it be remotely imported from a Windows 2008 R2 DC?

Currently i am working on taskpads for delegating some permissions to remote admins.I have following questions;

-> For Importing active directory module in powershell , shopuld it be locally installed or can it be imported remotely from a windows 2008 R2 DC?

-> For taskpads to work on remote workstations, should the administrative tools be installed on all the remote machines or is there a centralized way of maintaining them?

Please do let me know if anymore clarifications/questions regarding my efforts.

You can import remote module in this way (remoting must be enabled on remote server):

Create a Powershell remote session to a server with the activedirectory module installed.

$Session = New-PSsession -Computername Server1

Use the newly created remote Powershell session to import the module to that session

Invoke-Command -Command {Import-Module ActiveDirectory} -Session $Session

Use that session with the modules to add the available commandlets from the activedirectory module to your local Powershell session adding a name prefix.

Import-PSSession -Session $Session -Module ActiveDirectory -Prefix RM

The code above enables the use of Active Directory commandlets on a computer that doesn't have this module installed.

Use AD commandlets in the Powershell command shell with modified names based on the -Prefix set above:

Get-RMAdUser instead of the standard Get-ADUser Get-RMAdComputer instead of the standard Get-ADComputer

You can avoid the -Prefix RM but it's handy for remember that are imported from remote.

For taskpad I'm pretty sure that must be present on each client installing RSAT with the ADUC mmc snap-in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM