The property value is invalid. The value can’t contain leading or trailing whitespace.

I have encountered this problem while setting up Microsoft exchange 2010. After jumping through all of the appropriate hoops, the installation process stops with an area that looks something like this:

Organization Preparation
Failed

Error:
The following error was generated when “$error.Clear(); $acceptedDomains = @{}; Get-AcceptedDomain | foreach { $domainName = $_.DomainName.ToString(); if ($acceptedDomains.Contains($domainName)) { Write-ExchangeSetupLog -Warning “Duplicate AcceptedDomain found. ‘$($acceptedDomains[$domainName])’ and ‘$($_.Name)’ both reference domain ‘$domainName'”; } else { $acceptedDomains.Add($domainName, $_.Name); }; }; function getSmtpTemplates ([string]$property) { $input | Select-Object -ExpandProperty $property | Where-Object {$_.PrefixString -eq “SMTP”} | Foreach-Object {$_.AddressTemplateString -replace “.*@”, “”}; } function addDomains ([Microsoft.Exchange.Data.Directory.SystemConfiguration.AcceptedDomainType]$domainType) { $domain = $null; $input | Where-Object {-not $acceptedDomains.ContainsKey($_)} | Where-Object {[Microsoft.Exchange.Data.SmtpDomainWithSubdomains]::TryParse($_, [ref] $domain)} | Foreach-Object { $name = $domain.ToString(); if ($name.Length -gt 64) { $name = $name.Substring(0, 64) }; if ($acceptedDomains.ContainsValue($name) ) {$name = [System.Guid]::NewGuid().ToString()}; new-AcceptedDomain -Name:$name -DomainName:$domain -DomainType:$domainType; $acceptedDomains[$domain.ToString()] = $name; }; } $emailAddressPolicies = Get-EmailAddressPolicy; $emailAddressPolicies | getSmtpTemplates “NonAuthoritativeDomains” | addDomains “InternalRelay”; $emailAddressPolicies | getSmtpTemplates “EnabledEmailAddressTemplates” | addDomains “Authoritative”;” was run: “The property value is invalid. The value can’t contain leading or trailing whitespace. Property Name: Name”.

The property value is invalid. The value can’t contain leading or trailing whitespace. Property Name: Name

Now the interesting thing is that the error was repeated the exact number of recipient policies that existed in the exchange server 2003 running on the same domain. This indicated to me (now in correctly I understand) that each of the recipient policies had an invalid whitespace either before or after the policy name.

I really scratched my head a lot trying to resolve this, as I found there was not so much in the way of assistance available to the error that is given by exchange 2010.

That being: “The property value is invalid. The value can’t contain leading or trailing whitespace.”

So after exhausting all of my resources I installing exchange server 2007 service Pack 1. This area and with a slightly different error: “The Name property contains leading or trailing whitespace, which must be removed”

research on this led me fairly quickly to the following article: http://technet.microsoft.com/en-us/library/dd233089.aspx

  • Start the ADSI Edit tool, and then connect to the Configuration container. To do this, follow these steps:
    1. On a server, click Start, click Run, type adsiedit.msc, and then click OK.
    2. In the navigation pane, click ADSI Edit.
    3. On the Action menu, click Connect to.
    4. Click Select a well known Naming Context if this entry is not already selected.
    5. In the Select a well known Naming Context list, click Configuration, and then click OK.
  • Expand the following nodes:
    • Configuration [<domainController>.contoso.com]
    • CN=Configuration,DC=contoso,DC=com
    • CN=Services
    • CN=Microsoft Exchange
    • CN=<OrganizationName>
  • Under CN=<OrganizationName>, click CN=Recipient Policies.
  • In the details pane, examine the recipient policy DNs to locate any entries that resemble the following:
    CN=<policy name>\,CN=Recipient Policies,CN=<OrganizationName>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com
  • Note whether any DNs appear together with a backslash character (\) or if any leading or trailing white spaces appear in the DN. A backslash character is used to “escape” the white-space character.
  • Use the Exchange Management Console to remove any white spaces from the recipient policy name. To do this, follow these steps:
    1. In the Exchange Management Console, expand Organization Configuration, and then click Hub Transport.
    2. Click the E-mail Address Policies tab, right-click the appropriate policy, and then click Edit.
    3. Delete any leading or trailing white spaces from the policy name, and then finish modifying the policy.

    What all of this is saying is that if you drill down to: configuration, CN services, first organisation, recipient policies. You will see a list of all of the recipient policies were the server. In the list on the far right is a column called a distinguished names. Hunt very carefully within all of the darter under the distinguished names column and look very closely for a backslash “\”

    Note the recipient policy that the backslash is found on, and go to the exchange system manager and in the recipient policies edit the associated recipient policy to remove the space which the backslash represents that she found in the step above.

    Once you have edited or all of the recipient policies that have a backslash in them to remove the associated whitespace or blank space you will find the exchange server 2010 will install successfully. And for that matter I expect that exchange server 2007 would install just as easily.

    You really do have to love the Microsoft installation process, that can fail with an error that is completely meaningless, but still seven lines deep a completely random useless code that does everything except tell you the associated recipient policy that is in error. Microsoft I wish you could feel our pain!

  • Hope you find this helpful. Please see more at: http://www.interactivewebs.com

    Digg This

    Leave a Reply

    Your email address will not be published. Required fields are marked *