I'm working with an existing SDL Web 8.5 DEV environment which already has many thousands of pages published across approximately 60 sites.

Within Topology Manager, we'd like to rename the ID of the 60-ish Mappings (along with the ID value of the Content Delivery environment). This is to ensure consistency (or at least intuitiveness) between environments.

Understandably, the Set-TtmMapping PowerShell cmdlet takes the ID as a parameter and only allows the RelativeURL to be updated, so I was hoping that I could just remove the old Mapping (using Remove-TtmMapping -ID id_I_want_to_change) and then recreate it (using Add-TtmMapping...).

However, the problem that I'm facing is that I cannot remove these Mappings because content has been published from the associated Publications to this Content Delivery environment. Here is the error message:

PS C:\Users\jwilliams> Remove-TtmMapping -ID tcm0_999_1_Something

Removing Mapping 'tcm0_999_1_Something'

Remove-TtmMapping : Mapping with id 'tcm0_999_1_Something' can not be deleted because thare are items published to it. At line:1 char:1

Therefore, I was considering the following approach:

  1. Export the existing Content Delivery configuration (using Export-TtmCdStructure) and modifying the IDs as necessary
  2. Decommission this Content Delivery environment (using Clear-TtmCdEnvironment) and then delete it (including the Mappings)
  3. Re-create the Topology configuration again with the new IDs (using Import-TtmCdStructure)
  4. Re-sync the Topology Manager configuration with the Content Delivery environment (using Sync-TtmCdEnvironment)

However, I'm not sure what the exact impact will be on the publish states (i.e. details of which items have been published to which Target Types) if I take this approach.

Q1. Is this a viable approach and what will happen to the publish states of existing items?

Q2. Is there a more appropriate mechanism for what I'm trying to achieve?

Side note: We have already used the Convert-TcmPublishStates cmdlet (as described here) as part of the upgrade, so would be comfortable using that again if needed.

Update (12th July 2017) - Reasoning: In response to Rick's question below, the reason why we want to update the Mapping IDs is so that they're consistent across environments.

At the moment, the Mapping IDs contain the environment name (e.g. tcm0_470_1_Development). However, for maintainability, I don't want to have the environment name in the ID and would instead prefer to have the Target Type name (e.g. tcm0_470_1_Staging)

This will allow me to have just one set of PowerShell scripts for creating the Mappings across all environments (the Publication IDs are the same across environments) and just pass in the CmEnvironmentId variable.


I must say you came up with a creative solution, including the use of Topology Manager import/export functionality! :-)

However, decommissioning the CD Environment (step 2) will drop the publish states for that environment in CM. I guess you don't want that to happen.

In general, we didn't design Topology Manager with the idea that people want to change the Identifiers of Mappings (or even care about those) in mind. Can you elaborate on why you do care?

  • Hi Rick. Thanks for your answer. I have added the reasoning for wanting to do this to the bottom of my question. – Jonathan Williams Jul 12 '17 at 9:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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