Share via

Error running djoin.exe. Return code: -2147023174

Rai, RabinsX 21 Reputation points
2022-08-08T12:40:49.697+00:00

Can someone explain what this error code means ? Below command is executing BY CODE - djoin.exe /provision /reuse /domain userDomain /dcname targetDC /machine machineName /savefile c:\rabins\odjservice\" + machineName_odj.txt

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | User experience | PowerShell

Answer accepted by question author

Gary Reynolds 9,626 Reputation points
2022-08-08T22:55:18.903+00:00

Hi @Rai, RabinsX

The details of the error code are

Hex: 0x800706BA 	Int: -2147023174  
Severity Code: 10 - Warning,	Source Facility: Win32,	Error Code: Hex: 0x06BA Int: 1722  
  
(-2147023174) The RPC server is unavailable.  

Normally an 1722 error, either means the target server is not available or the DNS resolution is not working, which might be caused by a wrong server\domain name in this case.

Gary.

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Limitless Technology 40,106 Reputation points
    2022-08-09T07:25:14.537+00:00

    Hi there,

    These are returned by the GetLastError function when many functions fail. To retrieve the description text for the error in your application, use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag.

    By default, the Djoin.exe commands target a domain controller that runs Windows Server 2008 R2. However, you can specify an optional /downlevel parameter if you want to target a domain controller that is running a version of Windows Server that is earlier than Windows Server 2008 R2.

    System Error Codes (0-499) https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-

    --------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    Was this answer helpful?

    0 comments No comments

  2. Philippe Levesque 5,846 Reputation points Volunteer Moderator
    2022-08-08T12:56:39.887+00:00

    Hi

    From memory it's a permission issue, make sure the account can run the tool can use djoin.

    If the tool must be run as admin, make sure your code is executed under the user account, and if run as a admin is used it's runned by default as the local system's account.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.