In Dynamics 365 for Operations (AX7) there is a new tool to use to export, import, replace or delete models called modelutil.exe. It is the replacement for Dynamics AX 2012’s axutil.exe. Modelutil.exe is located in the bin directory of your packages folder. For example, on the VM provided by Microsoft the location of the bin directory is “c:\AOSService\PackagesLocalDirectory\bin”. If you open modelutil via a command prompt you can see the different commands it contains by running this command “modelutil.exe /?”.
Here are a couple examples of how to use it:
To delete a model in modelutil use the following command:
1 2 3 |
Modelutil.exe -delete -metdatastorepath="path to metadatastore" -modelname="model name" For example to delete a model named SSI: Modelutil.exe -delete -metadatastorepath="c:\AOSService\PackagesLocalDirectory" -modelname="SSI" |
To export a model use this command:
1 2 3 4 |
Modelutil.exe -export -metadatastorepath="path to metadatastore" -modelname="model name" -outputpath="path to the folder where the model should be saved" For example to export a model named SSI: Modelutil.exe -export -metadatastorepath="c:\AOSService\PackagesLocalDirectory" -modelname="SSI" -outputpath="c:\TestDirectory" The file saved into the TestDirectory will be named SSI.axmodel |
Want to know more?
Learn more about the essentials of development in Microsoft Dynamics 365 for Operations with our training courses.
Hi very nice post. But I’m facing an error trying to run ModelUtil.exe through command prompt (running as adm): “This app can’t run on your PC”. I have already tried to disable SmartScreen, give permission to the folder, but nothing works. Can you please help me? Regards, Leo
Hello Leo,
Can you a look at the event viewer, hopefully you will see some additional information to go off of.
Thanks,
Brandon