#定义组名 $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 }
时间: 2024-10-09 13:10:55
#定义组名 $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 }