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.
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.
我知道这有点晚了,但是你可以使用PowerShell
's Active Directory
modulde 来做到这一点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 功能的“远程服务器管理工具”选项卡下找到。