我使用的是PowerShell
2.0版本,想知道如何将域计算机添加到域全局组中。
我也想知道是否有一个好的网站去,有V2
命令和例子。
我知道这有点晚了,但是,您可以使用PowerShell
的Active Directory
模块在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 Directory
windows功能才能使用activedirectory
模块。这可以在windows功能中的"远程服务器管理工具"选项卡下找到。
链接:对于AD模块中的Cmdlet的