Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

How to manage and configure BC online with PowerShell scripts

Posted on by 198

Hi,

I want to know how I can automatically duplicate prod environment for preprod and test usages.

and how I can change BC configurations automatically.

Because our BC is connected to CRM/dataverse , when I create a copy for preprod, I have to connect this copy to my preprod CRM. (and I have to configure the CRM to point to the correct BC instance)

for Dataverse I'm using powershell scripts to manage all the changes.

but what about BC side?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,565 Super User 2024 Season 2 on at
    RE: How to manage and configure BC online with PowerShell scripts

    Hi, I tested the Automation APIs for Dynamics 365 Business Central SaaS before.

    Hope the following helps as well.

    https://yzhums.com/6287/

    https://yzhums.com/12259/

    Thanks.

    ZHU

  • Suggested answer
    Vinita_Kas Profile Picture
    Vinita_Kas 325 on at
    RE: How to manage and configure BC online with PowerShell scripts

    Hi

    There is no direct way to take a backup

    And Backups for the online version are anyway taken automatically and you can restore or ask Microsoft for help if any issues in that

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/faq#how-often-are-production-databases-backed-up

    If you want to manually then 

    Go to the specific Settings > Admin center and you would see below is the list of environments and click on your production env

    pastedimage1653778992631v1.png

    There is an option to Copy

    pastedimage1653779024434v2.png

    Now after the copy button you can specify the new env name 

    Note that if you already have 1 production and 3 sandbox system would not allow any more hence ensure that you could delete the env to create new one and  then click on copy 

    If you want this to be done automatically then use this link which has a table at the end for operations

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/tenant-admin-center-environments

    and this link has the list of APIs which can be used

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/administration-center-api_environments#copy-environment

    Pl check and let me know if this is helpful 

    Regards

    Vinita

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans