################################################################# # This script will help to move bulk ad computer accounts into target OU # Written 08/08/15 Casey, Dedeal # Fell free to change use any part of this script # http://www.smtp25.blogspot.com/ ################################################################# #Importing AD Module Write-Host " Importing AD Module..... " import-module ActiveDirectory Write-Host " Importing Move List..... " # Reading list of computers from csv and loading into variable $MoveList = Import-Csv -Path "C:\tool\move-Computer.csv" # defining Target Path #$TargetOU = 'OU=Computers,OU=VA,DC=TekPros,DC=com' $countPC = ($movelist).count Write-Host " Starting import computers ..." foreach ($Computer in $MoveList){ Write-Host " Moving Computer Accounts..." Get-ADComputer $Computer.CN | Move-ADObject -TargetPath $Computer.TargetOU } Write-Host " Completed Move List " Write-Host " $countPC Computers has been moved " 官方文档:https://gallery.technet.microsoft.com/scriptcenter/Move-AD-Computer-Object-4ed2c5f8 https://gallery.technet.microsoft.com/scriptcenter/Move-AD-Computer-Object-4ed2c5f8#content
2021-06-16 11:55:35 801B Active Directory
1
netdom 命令行软件通过命令行进行加域,可以手动指定计算机到某个OUex:netdom join /d:devgroup.contoso.com mywksta /OU:OU=Dsys,OU=Workstations,DC=devgroup,DC=contoso,DC=com
2021-03-23 14:27:19 249KB 加域 netdom 指定OU
1