Exploring TM1 - a Chartertech Company
Close this search box.

TM1 Migration Simplified using Windows Tools

Keeping track of items that need migration from Development to Production isn’t always easy. TM1 doesn’t offer much help in this regard, and it’s usually up to the developer to keep track of things. Fortunately Windows has several useful tools to help you create your migration packages.

Microsoft to the Rescue

Windows contains tools and features that allows for some automation, and as long as you’re organised, migration is a relatively simple process.

These are the tools that I use: Windows Explorer, Excel (or Notepad), and PowerShell. They are applications native to Windows, so you can rest assured they aren’t going anywhere.

Sort By: Date created

In a development cycle, sorting the Data folder by Date created will highlight the recently created objects. Importantly, this includes items created by the TM1 server.

Sort by date created

Use Copy Path and Leverage Excel

I keep a list of of migration objects in Excel. To generate the file paths including extensions, I use Copy path in Windows Explorer, before pasting into Excel.

Copy path

I like using Excel as it allows me to search for objects, and sort and filter by object extension, highlight duplicates, and use the tabs to segment packages. It also provides a paper trail of objects migrated.


Use PowerShell to Create the TM1 Migration Package

I use PowerShell to collate the objects listed in Excel (saved as a .csv file), and copy them to a new folder. This is far more efficient and accurate than manually selecting objects.

Do note, the script below clears the target folder before copying in the objects (i.e deletes everything in the target folder). You can remove the first line of code if do not need that behaviour. Thereafter it iterates the .csv file, recreates folder structures, and copies objects from source (Data folder) to target (TM1 migration package folder).

Get-ChildItem -Path "C:24Retail Migration 1" -Include * | remove-Item -recurse 
#Set target folder
$newdes = "C:24Retail Migration 1"
#Set migration list location 
$safe = Get-Content "C:migrationlist.csv"
#Iterate the csv (fetches items from the Data folder and copies to the migration folder)
$safe | ForEach-Object{
    #Check if folder exists
    $void=Get-Item $folder -ErrorVariable err  -ErrorAction SilentlyContinue
    $folder=Split-Path -Path $newdes -Parent
    if($err.Count -ne 0){
        #Create folder when it doesn't
        $void=New-Item -Path $folder -ItemType Directory -Force -Verbose
    $void=Copy-Item -Path $_ -destination $newdes -Recurse -Container -Force -Verbose

Final thoughts

The most important part of any migration would be take backup your target environment before deploying your package.

The Complete Guide to TM1 Migration

We also have an end to end guide for migrating TM1 from Development to Production available here. It is the Definitive guide to TM1 Migration and includes a downloadable checklist to help you with your migration.

Need Help?

If you need any advice or help with your TM1 migration, please ping us. We’d be delighted to offer you some advice or help out if needed.

Exploring TM1 – Contact Us

  • This field is for validation purposes and should be left unchanged.
  • This field is for validation purposes and should be left unchanged.

Post Sections

Related Posts

Leave a Reply

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

Log In