将域组添加到本地组的脚本失败了50%
我们有一个脚本,可以自动将新映像的计算机添加到域中。 join域的function总是成功的。 但是,当脚本尝试添加域组时,它会在50%的时间内失败。 以下是脚本。 我没有写,我只是要弄清楚为什么它失败了。 我replace了公司识别信息。 有任何想法吗? On Error Resume Next Const HKEY_LOCAL_MACHINE = &H80000002 Dim WShell, oReg Dim intReturn Dim strComputer, strKeyPath, strPortConf, strValue, strTempDir, strUser, strChassis, strPath Dim strDomain, strDomainUser, strDomainPW, strDomainOU Dim booDesktop, booLaptop Dim strPCName, objWMIService strDomain = "ourDomain.com" strDomainUser = "serviceaccountname" strDomainPW = "serviceaccountpassword" strDomainOU = "OU=Production,OU=General Workstations,DC=SOMETHING,DC=GOES,DC=HERE,DC=COM" booLaptop = […]