0

I'm using PowerShell version 2.0 and wanted to know how to add a Domain Computer into a Domain Global Group.

Also I would like to know if there is a good site to go to that has V2 commands and examples.

4

1 回答 1

0

我知道这有点晚了,但是你可以使用PowerShell's Active Directorymodulde 来做到这一点PowerShell 2.0

Import-Module activedirectory

$globalGroup = "Your_Global_Group"
$computerName = "Your Computer Name"

$computerObj = Get-ADComputer $computerName -properties *
Add-ADGroupMember -Identity $globalGroup -Members $computerObj.DistinguishedName

注意:您需要打开Active Directorywindows 功能才能使用该activedirectory模块。这可以在 Windows 功能的“远程服务器管理工​​具”选项卡下找到。

链接:对于 AD 模块中的 Cmdlet

于 2013-08-07T14:52:32.473 回答