MVP - Most Valuable Professional
rss

Just can't get enough of IT

This blog is about mostly anything in IT. But the primary focuses are Microsoft Technologies like Exchange, Office 365, Azure and Cloud Security.

When you run your Exchange Organization in hybrid mode with Office 365 and you migrate your on-premise Public Folders to Office 365, you are required to configure a remote Public Folder Mailbox in the Exchange Organization settings.

Organization Configs with Exchange 2013 Public Folders On-Premise

With Public Folders on-premise your Exchange Online Org looks like this:

Get-OrganizationConfig | fl *public*

DefaultPublicFolderAgeLimit             :
DefaultPublicFolderIssueWarningQuota    : 1.7 GB (1,825,361,920 bytes)
DefaultPublicFolderProhibitPostQuota    : 2 GB (2,147,483,648 bytes)
DefaultPublicFolderMaxItemSize          : Unlimited
DefaultPublicFolderDeletedItemRetention : 30.00:00:00
DefaultPublicFolderMovedItemRetention   : 7.00:00:00
PublicFoldersLockedForMigration         : False
PublicFolderMigrationComplete           : False
PublicFoldersEnabled                    : Remote
PublicComputersDetectionEnabled         : False
RootPublicFolderMailbox                 : 00000000-0000-0000-0000-000000000000
RemotePublicFolderMailboxes             : {PublicFolder-Mailbox001}

With Public Folders on-premise your On-Premise Exchange Org looks like this:

Get-OrganizationConfig | fl *public*

DefaultPublicFolderAgeLimit             :
DefaultPublicFolderIssueWarningQuota    : Unlimited
DefaultPublicFolderProhibitPostQuota    : Unlimited
DefaultPublicFolderMaxItemSize          : Unlimited
DefaultPublicFolderDeletedItemRetention : 30.00:00:00
DefaultPublicFolderMovedItemRetention   : 7.00:00:00
PublicFoldersLockedForMigration         : True
PublicFolderMigrationComplete           : True
PublicFoldersEnabled                    : Local
PublicComputersDetectionEnabled         : False
RootPublicFolderMailbox                 : ae0ef819-90d2-45d0-92b6-8b2062cf71a3
RemotePublicFolderMailboxes             : {}

Organization Configs with Exchange 2013 Public Folders in Exchange Online

With Public Folders in Exchange Online your Exchange Online Org looks like this:

Get-OrganizationConfig | fl *public*

DefaultPublicFolderAgeLimit             :
DefaultPublicFolderIssueWarningQuota    : 1.7 GB (1,825,361,920 bytes)
DefaultPublicFolderProhibitPostQuota    : 2 GB (2,147,483,648 bytes)
DefaultPublicFolderMaxItemSize          : Unlimited
DefaultPublicFolderDeletedItemRetention : 30.00:00:00
DefaultPublicFolderMovedItemRetention   : 7.00:00:00
PublicFoldersLockedForMigration         : False
PublicFolderMigrationComplete           : False
PublicFoldersEnabled                    : Local
PublicComputersDetectionEnabled         : False
RootPublicFolderMailbox                 : 5810bb30-cdda-4287-85a4-8a2547bb9b01
RemotePublicFolderMailboxes             : {}

With Public Folders in Exchange Online your Exchange On-Premise Org looks like this:

Get-OrganizationConfig | fl *public*

DefaultPublicFolderAgeLimit             :
DefaultPublicFolderIssueWarningQuota    : Unlimited
DefaultPublicFolderProhibitPostQuota    : Unlimited
DefaultPublicFolderMaxItemSize          : Unlimited
DefaultPublicFolderDeletedItemRetention : 30.00:00:00
DefaultPublicFolderMovedItemRetention   : 7.00:00:00
PublicFoldersLockedForMigration         : True
PublicFolderMigrationComplete           : True
PublicFoldersEnabled                    : Remote
PublicComputersDetectionEnabled         : False
RootPublicFolderMailbox                 : 00000000-0000-0000-0000-000000000000
RemotePublicFolderMailboxes             : {mcsmemail.de/Users/PF365-Mailbox-01-55e3d544-ed5a-4557-9008-d8c1b6f06d86}

The remote public folder mailbox has been added to the on-premise Exchange confguration by using:

Set-OrganizationConfig -RemotePublicFolderMailboxes PF365-Mailbox-001 -PublicFoldersEnabled Remote

To be able to add the remote public folder mailbox in a hybrid configuration you are required to add the public folder mailbox (or mailboxes, if you have more than one serving the hierarchy) as a mail user.

Microsoft provides a PowerShell script as part of a script collection here.

The issue with Import-PublicFolderMailboxes.ps1

When you run the Import-PublicFolderMailboxes.ps1 script you might run into the following error:

Cannot bind parameter 'Name' to the target. Exception setting "Name": "The length of the property is too long. The
maximum length is 64 and the length of the value provided is 65."
    + CategoryInfo          : WriteError: (:) [New-MailUser], ParameterBindingException
    + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.Exchange.Management.RecipientTasks.NewMailUser
    + PSComputerName        : ex2013.mcsmemail.de

The name attribute for a mail user is limited to 64 characters. But why are you exceeding the length when the mailbox name is only 17 characters long?

It turns out that the PowerSheel script adds a prefix name "" and ther mailbox GUID as a suffix. And voilá, the name exceeds the allowed length for the mail user name attribute.

Recommendation

Don't use more than 16 characters when naming the Public Folder mailboxes in Office 365.

Or modify the Import-PublicFolderMailboxes.ps1 script to fit your needs.

$hasPublicFolderServingHierarchy = $true;
$displayName = $publicFolderMailbox.Name.ToString().Trim();
# ORIG: $name = "RemotePfMbx-" + $displayName + "-" + [guid]::NewGuid();
$name = $displayName + "-" + [guid]::NewGuid();
$externalEmailAddress = $publicFolderMailbox.PrimarySmtpAddress.ToString();

 

 

Links

 


You need assistance with your Exchange Server setup? You have questions about your Exchange Server infrastructure and going hybrid? You are interested in what Exchange Server 2016 has to offer for your environment?
Contact me at thomas@mcsmemail.de
Follow at https://twitter.com/stensitzki

Read More »

Description

This script adds multiple public folder servers to all public folders below a TopPublicFolder.

The script has been developed as part of an on-premise legacy public folder migration from Exchange 2007 to Exchange Server 2010.

The script waits a given timespan in seconds to let public folder hierarchy replication and replica backfill requests kick in.

It is assumed that the script is being run in an Exchange 2007 or Exchange 2010 server.

Examples

# Add replicas for SERVER01,SERVER02 to all sub folders of \COMMUNICATIONS\PR

.\Add-PFReplica.ps1 -ServersToAdd SERVER01,SERVER02 -PublicFolderServer SERVER01 -TopPublicFolder "\COMMUNICATIONS\PR

Version History

  • 1.0, Initial community release
  • 1.1, Fixes to run properly with Exchange 2010

Links

Follow

Read More »

A new PowerShell script to add multiple legacy public folder replicas has been published to TechNet Gallery and Github

The script supports public folder migration during migration phases when upgrading to a new version of Exchange. Depending on the timespan for a migration project and the internal requirements of public folder replication, you might need a different apporach to add legacy public folder replicas.

Add replicas for SERVER01, SERVER02 to all sub folders of \COMMUNICATIONS\PR

 .\Add-PFReplica.ps1 -ServersToAdd SERVER01,SERVER02 -PublicFolderServer SERVER01 -TopPublicFolder "\COMMUNICATIONS\PR"

 

Note

The script is intended to work with legacy public folders on Exchange Server 2007 and Exchange Server 2010.

Links

 


Mailscape 365 - Hybrid Exchange & Office 365 Monitoring and Reporting
Many organizations are choosing to use a mix of on-premise Microsoft Exchange and hosted Office 365 to meet their staff needs. These deployments, however, are challenging to support, with several 'moving parts' that need to be monitored in order to ensure reliable messaging and calendaring services - Test Drive Mailscape for Exchange Online

Read More »

Problem

When you mail enable an Exchange legacy public folder, a system object is created in Active Directory which is stored in the so called MESO object container

  • CN=Microsoft Exchange System Objects, DC=MCSMEMAIL, DC=DE

The object created contains all required attributes for Exchange address lists and other Exchange attributes.

When you mail disable a public folder Exchange Server is supposed to delete the MESO object as well. For some reason that might not happen. In this case the public folder will show in Public Folder Management Console as mail disabled, is still capable of receiving emails sent to its email address.

From an Exchange perspective, the email address can still be resolved, because a system object containing the email address still exists.

At first it looked like a permission issue on the MESO object container, but it wasn’t.

Solution

A Microsoft KB article described the issue for a single forest, multi-domain environment and a similar issue with Exchange Server 2010.

Configure the following registry on each Exchange Server hosting a public folder database and restart the MSExchangeIS service.

  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MsExchangeIS\ParametersSystem
  • DWORD (32 bit)
  • EnableDeletePFProxyAndStorePropTogether
  • Value = 1

In addition you should name the public folder and domain controller in the Exchange cmdlet

Enable-MailPublicFolder “\Public Folder Name” –Server PUBLICFOLDERSERVER –DomainController DC01

When you mail enable an exisiting public folder which looks like being mail disabled, but still having an (old) MESO object, a new MESO object will be created. The situation will be as follows:

  • Old MESO object attributes
    • displayName=Public Folder Name
    • CN=Public Folder Name
    • mail=PublicFolderName@mcsmemail.de
  • New MESO object attributes
    • displayName=Public Folder Name
    • CN=Public Folder Name 38513598
    • mail=PublicFolderName2@mcsmemail.de

The result is not necessarily as expected, as the old MESO object is orphaned an never reconfigured again.

Orphaned objects need to be cleaned up manually and beeing recreated again, if necessary. In an Exchange environement that has been migrated from ancient versions to 2010, you might already have a lot of MESO objects having digits added to their common names.

You can cleanup the MESO obejcts as follows:

  1. Delete orphaned object in MESO container
  2. Mail enable public folder

This results in a correctly named and configured MESO object. You can use Bill Long’s PowerShell script to identify orphaned public folder objects in the MESO container.

Note

This information is related to legacy Exchange public folders being hosted on Exchange Server 2007 and/or Exchange Server 2010.

The solution has been validated for Exchange Server 2007 as well, even though the KB article has been published for Exchange Server 2010 only.

Links

 


This post had originally been posted at my former blog SF-Tools.

You need assistance with your Exchange Server setup? You have questions about your Exchange Server infrastructure and going hybrid? You are interested what Exchange Server 2016 has to offer for your environment?

Contact me at thomas@mcsmemail.de
Follow at https://twitter.com/stensitzki

Read More »
Last updated: 2017-10-10

Description

This script removes the proxy address(es) for a selected protocol from mail enabled public folders.

Any proxy address with a given protocol is removed from the proxy addresses list.

The script can fix the alias of mail enabled public folders as well. The code used is based opon a blog post by Shay Levy.

Examples

# EXAMPLE 1
# Check mail enabled public folders for proxy addresses having "MS:" as a protocol type.
# Do not remove and update addresses, but log found addresses to RemovedAddresses.txt

.\Clean-MailEnabledPublicFolders.ps1 -ProtocolToRemove "MS:*" 

# EXAMPLE 2
# Check mail enabled public folders for proxy addresses having "MS:" as a protocol type.
# Remove and update addresses and log found addresses to RemovedAddresses.txt

.\Clean-MailEnabledPublicFolders.ps1 -ProtocolToRemove "MS:*" -UpdateAddresses

Version History

  • 1.0, Initial community release
  • 1.1, FixAlias added, cleanup logic changed
  • 1.2, Some minor PowerShell updates

Links

Follow

Additional Note

This Powershell script has been optimized using the ISESteroids™ add-on. Learn more about ISESteroids™ here.

 

 

Read More »