Home > Dynamics CRM > Installing CRM 4.0 – Keep Your Domain Clean!

Installing CRM 4.0 – Keep Your Domain Clean!

Good posting on Microsoft forum regarding untidy domains affecting the CRM 4.0 installs. This could mean that an old domain controller which was "removed" could still cause you issues.

If you ever get the error of domain name is either invalid or unreachable like below then you might want to read on:

Microsoft.Crm.Setup.Server.InstallConfigDatabaseAction failed. —> Microsoft.Crm.CrmArgumentException: Invalid domain name. Domain name is either invalid or unreachable. —> System.ArgumentException: Invalid domain name. Domain name is either invalid or unreachable.

Forum Posting here: http://forums.microsoft.com/Dynamics/ShowPost.aspx?PostID=2585429&SiteID=27

On this posting there is some code to help you list the domains active from the machine you wish to install CRM 4.0 on.  I created this inside a .vbs file and ran it using cscript from the system32 folder and it listed mine correctly – so it works! yay!.  You will need to list them to see if any old ones are lying around.

Here is the code (I could’ve re-written this in C# but thought there was no real gain) to find the current domains from your CRM 4.0 machine:

On Error Resume Next


Set objRootDSE = GetObject("LDAP://RootDSE")
strConfigurationNC = objRootDSE.Get("configurationNamingContext")

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand =  CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection

objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.CommandText = "SELECT ADsPath FROM ‘LDAP://" & strConfigurationNC & "’ WHERE objectClass=’nTDSDSA’" 

Set objRecordSet = objCommand.Execute

Do Until objRecordSet.EOF
    Set objParent = GetObject(GetObject(objRecordset.Fields("ADsPath")).Parent)
    WScript.Echo objParent.CN

If you would like to download this as a .vbs file to save the manual preparation, then you can have a copy of mine from here: http://www.box.net/shared/dh4ual3ww8

Once you have run this file and identified any unwanted domain controllers then I suggest you remove them or get them removed from the authorised domain admin’s.  For support on removing unwanted domain controllers and keeping your domain tidy, then read this Microsoft Support page:

Hope this helps any of those unusual failing installs!

Greg Olsen
Yellow Duck Guy

Categories: Dynamics CRM
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: