KACE Product Support Question

Windows 10 join domain task on K2000

02/10/2017 2474 views
The join domain task that has worked with all my Windows 8 deployments does not seem to work with Windows 10 x64 1607.  Has anyone else had issues with that.  It just fails and says unknown error.
2 Comments   [ + ] Show comments


  • Here's what I use to both join domain and drop into a specific OU on both Win7 and Win10 deployments.

    Post-install task parameter (credentials must have domain joining permissions):

    cscript join_domain_and_OU.vbs my.domain.com domainacct password OU=x,DC=x,DC=x,DC=x

    "Join_Domain_and_ou" VBS Script:

    Const JOIN_DOMAIN = 1
    Const ACCT_CREATE = 2
    Const ACCT_DELETE = 4
    Const WIN9X_UPGRADE = 16
    Const JOIN_UNSECURE = 64
    Const DEFERRED_SPN_SET = 256
    Const INSTALL_INVOCATION = 262144

    If WScript.Arguments.Count < 4 or WScript.Arguments.Count > 5 Then
    strDomain = WScript.Arguments.Item(0)
    strUser = WScript.Arguments.Item(1)
    strPassword = WScript.Arguments.Item(2)
    strOU = WScript.Arguments.Item(3)

    'set DNS IP address
    If WScript.Arguments.Count = 5 Then
    strDNSIP = WScript.Arguments.Item(4)
    Set objShell = CreateObject("WScript.shell")
    objShell.Run "netsh int ip set dns ""local area connection"" static "& _
    strDNSIP &" primary",0,0
    End If

    End If

    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, strOU, _
  • Password with cases? Only lower casing works

All Answers

I would go to the log at \windows\debug\netsetup.log and see what it shows as this should be where it logs the join domain actions. 

If the machine is part of a domain already you might want to use the power-shell script that it would be ok with the name being there and just add it to the machine.
Answered 02/10/2017 by: TheAustinDave
Brown Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ