Back to Blog Index

How one PowerShell library delivers Dynamics AX blue-green code promotion

By Bobby Pejman, Senior Technical Consultant, Arbela Technologies

One PowerShell library that delivers Dynamics AX Blue-Green Code Promotion, Environment Automation and Refreshes and much more. Made for Dynamics AX System Administrators, Environment Managers and Developers.

The concept of Blue-Green is the ability to release code to production without causing any outage to the end users. It falls in line with Continuous Integration/Continuous Development (CI/CD) approach which suggests that features that are developed, tested and become ready for production are released at any given time without any business interruption.

This concept has become more prevalent over the years as companies strive to minimize their production outages and release features as quickly as possible.

Those clients who have worked with Dynamics AX 2012 know that code promotion is a tedious and a highly manual task that requires an average of 2 to 4 hours of production outage, if not more. S


With significant amount of research and development and many years of experience working with Dynamics AX 2012, we have invented a method which allows Dynamics AX code to be promoted to production without any outage to the end user.

This method strictly follows Microsoft’s best practices and model store preparation (Compile, Full CIL, DB Sync) including the export/import of the model store. However, through research, we have discovered new ways to reduce the outage time.

Blue-Green Code Promotion

The Blue-Green process developed at Arbela is a sophisticated PowerShell library that allows code to be prepared in a Staging environment as you typically would using a model store and the model store can be released to production either manually or in an automated fashion but in a Blue-Green way.

Our PowerShell library is highly configurable with every action parameterized so it can meet any custom needs for any Dynamics AX implementation.

Script Parameterization

Each action that the PowerShell library executes comes with a series of parameters that are well documented and tested.

A specific action consists of Compiling, Generating CIL, Deploying Reports, Exporting Model Store, Importing Model Store, Synchronizing Database, Refreshing Environments, Exporting Environment Parameters and much more.

You will create a task script (Driver) which is simply a series of action calls to the main PowerShell library in order to accomplish a task. For example, an action can be “Deploy Reports” or “Restore Model Database” while a task would be “Refresh Stage” or “Promote Production Code.”

Arbela will manage the core PowerShell library and will provide updates as necessary. The client will manage the driver scripts that are specific to their needs.

Extensive Logging and Alerts

Every action that is executed in the PowerShell library is logged including its parameters. This approach will give full visibility and will make the troubleshooting process a lot easier. It will also help identify the most time-consuming actions within a task.

The PowerShell library can send emails upon completion or failure of each action as well.

Environment Automation

Using our PowerShell library, you can create a driver to refresh any environment ad-hoc or at a scheduled time. The script follows the same procedure as you typically would and is smart to export all specific environment settings, including those that are custom or provided by an ISV.

Multiple environments can be refreshed (data and/or model store) on a nightly scheduled basis in an automated fashion.

SOX Audit Compliance

For those publicly traded companies that undergo audit, having restricted access to production is key. The less manual intervention in the code promotion process the easier the audit process will be and the higher the pass rate. Using our PowerShell library in conjunction with proper process and procedures, you can eliminate any audit deficiencies.

Need some assistance? Contact us to request a demo of how this solution can help you reduce production outages