Domain Participation Tools

5/10/2007

You can use a domain participation tool to add your target system to a network domain. Microsoft Windows XP Professional and Microsoft Windows 2000 Service Pack 2 both provide Netdom.exe, a tool that joins a computer to a domain through a command-line interface. Netdom.exe is located on the Windows XP Professional or Windows 2000 Service Pack 2 product CD in the Support Tools directory.

You can also use the NetJoinDomain function to create a customized application for adding your target system to a domain. This function is part of the standard Win32 API.

The following example shows how to use the NetJoinDomain function.

dwError = NetJoinDomain( *szComputerName ? szComputerName : NULL,
                         szDomain,
                         NULL,
                         szUser,
                         szPassword,
                         dwFlags );
if( dwError != NERR_Success )
{
  //handle error
}
else
{
  //success
}

See Also

Tasks

Automatically Joining a Domain with a Custom Application

Other Resources

Domain Participation
Add Security Features to a Run-Time Image