When you try to add a Windows Server 2008 machine or a Windows 7 PC to a Windows Domain with the domain you may have the error
The attempt to join this computer to the
.com domain failed. The parameter is incorrect.
When you check the %systemroot\debug\Netsetup.log file you may find the error code 0×57 which translates to ERROR_INVALID_PARAMETER.
This can also happen if the name of the domain to which system is joined has more than 15 characters and you may find entries similar to the following in the Netsetup.log file:
01/15/2009 08:45:58:605 DomainDnsPolicy:
01/15/2009 08:45:58:605 Name: windowsreferenc=*)
01/15/2009 08:45:58:605 DnsDomainName: windowsreference.com
01/15/2009 08:45:58:605 DnsForestName: windowsreference.com
This is a known issue on the Windows 7 beta and the Windows Server 2008 R2 and there is a hotfix now available to fix the problem.