Batch add Domains
Scripts are available in the Microsoft website Script Center.
According to your requirements, you can first create a DHCP server, specify the client DNS to DC. Then you can share the script so that you can run it yourself. The script is as follows:
Const join_domain = 1
Const acct_create = 2
Const acct_delete = 4
Const win9x_upgrade = 16
Const domain_join_if_joined = 32
Const join_unsecure = 64
Const machine_password_passed = 128
Const deferred_spn_set = 256
Constinstall_invocation = 262144
Strdomain = "Domain"
Strpassword = "password"
Struser = "user"
Set objnetwork = Createobject ("wscript. Network ")
Strcomputer = objnetwork. computername
Set objcomputer = GetObject ("winmgmts: {impersonationlevel = impersonate }! \\"&_
Strcomputer & "\ Root \ cimv2: win32_computersystem.name = '"&_
Strcomputer &"'")
Returnvalue = objcomputer. joindomainorworkgroup (strdomain ,_
Strpassword ,_
Strdomain & "\" & struser ,_
Null ,_
Join_domain + acct_create)
Wscript. Echo "the computer has been added to the domain! Press OK to restart the computer! "
Set Ws = wscript. Createobject ("wscript. Shell ")
WS. Run "shutdown-r-t 0", 0
----- The red mark indicates your actual domain name, user name, and password. (before running the script, make sure that DNS resolution is normal.
----- It is not recommended that you run the script by yourself. This script saves some administrator operations. The script will leak account information and disable it when used up.
This article is from the "hongbifu" blog, please be sure to keep this source http://flambee.blog.51cto.com/112166/1572057
Batch add Domains