Print this Post

How to Create a NAV 2013 R2 Multi-Tenancy Demo Environment

I have had a few people asking for this .. So I’m just going to share you my script that I always use to convert a Single Tenancy Demo Environment to a Multi Tenancy Demo Environment, with some (Empty) companies per Tenant and such.. .

And I’m going to make it easy on me .. there are no guarantees that it will work for you out-of-the-box :).

The Script

Some words of explanation

As you see, I’m usually working with a Belgian database. The “parameters” section should help you to easily change the script to your own needs.

Furtheron, I’m just going to keep 1 active company (Belgian version has 2), copy it to a PRS company, create 13 more companies and going to create multiple tenants with each tenant some companies.. . Just try it out, and see what happens :).

The Result

It creates for you a Multi-Tenancy environment with three tenants:

  • “MainTenant” will have 1 company, being “MainCompany”. Check With:

    Get-NAVServerInstance | Get-NAVCompany -tenant “MainTenant”

  • “prscompany” will have 4 companies. One with data (PRS Company). Check With:

    Get-NAVServerInstance | Get-NAVCompany -tenant “prscompany”

  • “waldocompany” will have 10 empty companies. Check with:

    Get-NAVServerInstance | Get-NAVCompany -tenant “waldocompany”

Good luck!

5.00 avg. rating (97% score) - 2 votes

Permanent link to this article: http://www.waldo.be/2014/01/20/how-to-create-a-nav-2013-r2-multi-tenancy-demo-environment/


1 ping

Skip to comment form

  1. Gunnar Gestsson

    Thank you Waldo.
    It seems that the two of us are getting hooked on PowerShell…

    1. waldo

      We sure are 🙂

  2. Josué Hernández

    Hello waldo, first of all thanks for your help and collaboration; you think do a demo video of this case?

    1. waldo

      There actually is: https://www.youtube.com/watch?v=thQFJGTYA0E

  3. Pierluigi

    Hello waldo, I’ve a problem:
    1. I’ve a default Serverinstance DynamicsNAV71 with single tenent.
    2. from SQLServer 2012 i’ve done a backUp of Demo DB with 4 company in it and then
    3. i’ve create new DB MyDB from the backup.
    4. From NAV2013 R2 development env, I’m able to see my MYDB

    now, I need to remove, via REMOVE-NAVCompany cmdlet, all the companies from MyDB but i’m not able to force MyDB name in remove-NAVCompany cmdlet.
    have you any idea about?

    1. waldo

      You have to set up a service tier, before you can use any *-NAVCompany commandlet.. . So set up a service tier first, and off you go.

  4. Nikhil

    Hi Waldo, I’ve been following some of your posts and videos. My question may seem to be silly to you – I want to set up two demo DB – one is cronus international and other cronus australia. What is the procedure? Please treat me complete novice while replying.. :), thanks in advance.

  5. Nikhil

    Hi Waldo, just adding more info before your answer. I’ve installed cronus international using Nav 2013 R2, now trying to install cronus AU. I’ve developer env., powershell, admin tool, RTC & sql server mgt. studio installed on my system.

    1. waldo

      Sorry, man .. really don’t know what you mean.
      I’d like to encourage you to go to http://www.mibuso.com and use the forum. Lots of people will be able to help you.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: