[英]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? -> 对于在 powershell 中导入活动目录模块,是否可以在本地安装它还是可以从 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.创建到安装了 activedirectory 模块的服务器的 Powershell 远程会话。
$Session = New-PSsession -Computername Server1
Use the newly created remote Powershell session to import the module to that session使用新创建的远程 Powershell 会话将模块导入该会话
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.使用该会话与模块将 activedirectory 模块中的可用命令行开关添加到本地 Powershell 会话,并添加名称前缀。
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.上面的代码允许在未安装此模块的计算机上使用 Active Directory commandlet。
Use AD commandlets in the Powershell command shell with modified names based on the -Prefix set above:在 Powershell 命令外壳中使用 AD commandlet 并根据上面设置的 -Prefix 修改名称:
Get-RMAdUser
instead of the standard Get-ADUser
Get-RMAdComputer
instead of the standard Get-ADComputer
Get-RMAdUser
代替标准Get-ADUser
Get-RMAdComputer
代替标准Get-ADComputer
You can avoid the -Prefix RM
but it's handy for remember that are imported from remote.您可以避免使用-Prefix RM
但记住它是从远程导入的,这很方便。
For taskpad I'm pretty sure that must be present on each client installing RSAT with the ADUC mmc snap-in.对于任务板,我很确定必须存在于每个使用 ADUC mmc 管理单元安装 RSAT 的客户端上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.