将某个组中的账户移动到新的OU下
将某个组中的账户移动到新的OU下
#定义组名 $groupname = "testg" #定义新的OU名称 $newou = "OU=oo,OU=Admins,dc=ddv,dc=com" $members = (get-adgroup $groupname -properties member).member foreach ($member in $members) { Move-ADObject -Identity $member -TargetPath $newou }