AXUtil and Powershell Commands for AX 2012.
Today I will demonstrate you few AXUtil and Powershell commands for AX 2012.
Exporting
a Model with AXUtil.exe
To export a
model by using AXUtil.exe follow these steps.
1. Click Start
> All Programs > Accessories and right-click Command
Prompt selecting Run
as administrator.
2. Change
directory to "\Program Files\Microsoft DynamicsAX\60\Server\MicrosoftDynamicsAX\Bin"
or to the bin directory for your server installation.
3. Type
"AxUtil.exe export/file:<path to save your
model>.axmodel/model:<model name>" and then press Enter
to export the model.
Importing a Model with AXUtil.exe
To import a
model by using AXUtil.exe follow these steps.
1. Click Start
> All Programs > Accessories and right-click Command
Prompt selecting Run
as administrator.
2. Change
directory to "\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin"
or to the bin directory for your server installation.
3. Type
"AxUtil.exe import /file:<path to where you saved your
model>.axmodel and then press Enter to
import the model.
Exporting a Model with Windows PowerShell
To export a
model by using Windows PowerShell, follow these steps:
1. Click Start,
and then click Administrative Tools >
Microsoft Dynamics AX Management Shell.
2. At the
Windows PowerShell command prompt, type the following command, and then press
ENTER.
Export-AXModel
-Model <name> -File
<Filename.axmodel>Replace
<name> with
the name of the model to export, and<Filename.axmodel> with
a path and file name where you want to
save the
exported model.
Importing a Model with Windows PowerShell
To import
the Model Store by using Windows PowerShell follow these steps.
1. Click Start
menu, and then click Administrative
Tools > Microsoft Dynamics AX Management Shell.
2. At the
Windows PowerShell command prompt, type the following command, and then press
ENTER.
Install-AXModel
-File <Filename.axmodel> -Details
Replace <Filename.axmodel> with
the path and file name of the previously
exported model. The optional -Details switch
tells the cmdlet
to list all the layers and models contained in the model store.
After a
model is imported, the AOS has to be restarted and a full compile and full CIL
generation must be completed.
Comments
Post a Comment