將以下內容存為vbs
檔案,在xp下執行即可實現加入域.
'domain需更改為自己域的名稱
strpassword = "youradminpass"
'有domain admins組許可權的使用者及密碼
struser = "adminusername"
set objnetwork = createobject("wscript.network")
strcomputer = objnetwork.computername
set objcomputer = getobject("winmgmts:!//" & _
strcomputer & "/root/cimv2:win32_computersystem.name='" & _
strcomputer & "'")
returnvalue = objcomputer.joindomainorworkgroup(strdomain, _
strpassword, strdomain & "/" & struser, null, _
join_domain + acct_create)
wscript.echo "the command completed successfully."
wscript.echo "pls. reset your computer!"
'*****************
'* end script
'*****************
利用指令碼加入域和退出域
利用指令碼加入域和退出域 加入域的指令碼 echo off netdom join computername domain test.com userd user passwordd pass reboot 5 退出域的指令碼 echo off netdom remove computername ...
利用BAT指令碼加入域和退出域
加入域的指令碼 echo off netdom join computername domain test.com userd user passwordd pass reboot 5 退出域的指令碼 echo off netdom remove computername domain test.c...
域成員計算機加入域問題
域成員計算機加入域 張東輝 2 在加入域的計算機上,用域使用者帳號登入到域。說明 在域中的非dc計算機上,可以選擇登入到域或本機,這是因為它同時還擁有本地使用者帳號。而在dc上只能選擇登入到域了,因為整個域都是dc的,它沒有必要再保留本地帳號了。2000是個紅叉,03乾脆就沒有了。安裝ad時,會自動...