Uninstalling AX models with the same name

Development , Dynamics AX , ERP Add comments

Author Shon Harsh

Microsoft Certified Technology Specialist More ...

The new Windows Powershell tools for Microsoft Dynamics AX are very useful.  I recently encountered a problem that thankfully is easy to avoid and in this case was easy to solve.

Commands to view models by name

When removing or uninstalling a model from AX using PowerShell, the standard method is to specify the model name as a parameter.  For example:

Uninstall-AXModel -Model CustomAxModelFileName.model

I recently came across an environment that had two models with the same name.  While trying to uninstall the models I received an error:

“…multiple models exist with the same name.”

At first I tried to identify the model by other object properties and renaming a model.  This may be possible however I was unsuccessful and being in a time constraint I did not have time to polish my PowerShell skills.  The layer system of AX nevertheless saved the day!  I was able to change the command to remove all models in a specific layer and remove the intended models.

Uninstall-AXModel -Layer isp

This might be a way to keep momentum in the setup process when there are only a few models installed.  Another great tool is the AxBuild.exe tool available in CU7.

Complete information can be found on Technet here:

http://technet.microsoft.com/en-us/library/hh456294.aspx

Model on DAX friends!

Author Shon Harsh

Microsoft Certified Technology Specialist
More ...


Microsoft Dynamics AX is a robust ERP and Lean manufacturing enabler. The latest release, Dynamics AX 2012, combines the powerful planning and execution features required of comprehensive ERP integrated with the features of Lean to assist the "blended" manufacturer. Contact Agility Business Solutions, Inc. to learn more.

1 response to “Uninstalling AX models with the same name ”

  1. Gertjan van der Linden Says:
    You could have removed the model by using the id of the model instead of the name. This is a good solution if you have multiple models with the same name!

Leave a Reply

Leave this field empty:

Powered by Mango Blog. Design and Icons by N.Design Studio