1

I'm trying to run:

```

Sync-MailPublicFolders.ps1 -Credential (Get-Credential) -CsvSummaryFile "sync_summary.csv"

```

from https://docs.microsoft.com/en-us/exchange/collaboration-exo/public-folders/set-up-legacy-hybrid-public-folders , in Windows Server 2008 R2 (which doesn't appear to have Powershell ISE).

Without the backticks I get errors such as:

WARNING: Property expression "<public folder name>" isn't valid. Valid values are: Strings formed with characters from A to Z (uppercase or  lowercase), digits from 0 to 9, !, #, $, %, &, ', *, +, -, /, =, ?, ^, _, `, {, |, } or ~.
One or more periods may be embedded in an alias, but each period should be preceded and followed by at least one of the other characters. Unicode characters from U+00A1 to U+00FF are also valid in an alias, but they will be mapped to a best-fit US-ASCII string in the e-mail address, which is generated from such an alias.

With it in the form below (won't run without .\), I also get the same errors.

```.\Sync-MailPublicFolders.ps1 -Credential (Get-Credential) -CsvSummaryFile "sync_summary.csv"```

... both runs with errors I suspect is due to the backticks that are supposed to escape the spaces in the Public Folder names, but happy to be wrong about their purpose.

If the backticks are necessary, how does one use them?

1

As you mentioned, the error is prompted causes that space is in the public folders alias. If you rename the alias. You may need to check all public folder aliases to make sure that they don’t have invalid characters. After this, you can resume the synchronization.

You could run the following cmdlet to have a list with all the ones with spaces, and export it into a csv file. Note: On the cmdlet below, if you’re problem is not limited to spaces on the alias, you can change the where-object filtering to try and find other invalid characters.

Get-MailPublicFolder | Where-Object {$_.Alias -like "* *"} | Select-Object alias, identity |export-csv [CSV file path and name]

After getting a csv file with all the mail enabled public folders with invalid aliases, execute the following cmdlet:

Get-MailPublicFolder [Public Folder Name] |Set-MailPublicFolder -Alias [PublicFolderAlias]

Reconfigure directory synchronization

.\Sync-MailPublicFolders.ps1 -Credential (Get-Credential) -CsvSummaryFile:[CSV file path and name]

For more information, refer the following links:

https://mymicrosoftexchange.wordpress.com/2015/02/11/public-folder-migration-request-error-creating-the-public-folder-hierarchy-property-expression-property-name-isnt-valid/

https://social.technet.microsoft.com/Forums/exchange/en-US/466106c8-33a4-4474-83eb-2f6451e0d4eb/2010-2013-public-folder-migration-failed-property-expression-isnt-valid?forum=exchangesvrdeploy

  • Thanks Kelvin_D. Can you suggest why the MS webpage I linked to specifically had 3 lines including 2 with ``` as you seem to be suggesting that they aren't required? – user66001 Feb 19 '19 at 3:58
  • @Trix, I AM putting legacy public folders in hybrid mode (as is the purpose of the link I provided), and <public folder name> is a PLACEHOLDER for an actual Public Folder Name. – user66001 Feb 19 '19 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.