AxUtil and Windows PowerShell Commands for Deploying Models
Important
This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Two command line tools are available for deploying and managing models and the model store:
Windows PowerShell, a command-line scripting tool
AXUtil, a command-line utility
Both tools offer the same functionality, but we recommend that you use Windows PowerShell cmdlets, for the following reasons:
You can use Windows PowerShell cmdlets to create scripts that combine multiple actions.
You can use other Windows PowerShell cmdlets for Microsoft Dynamics AX to add users and user authentication, and to manage configurations for communication between Microsoft Dynamics AX and Microsoft SQL Server Reporting Services.
The AXUtil command-line utility is becoming obsolete in a future version of Microsoft Dynamics AX.
The following table describes the Windows PowerShell cmdlets and the equivalent AXUtil commands that can be used to manage models and the model store.
Windows PowerShell cmdlet |
AXUtil command |
Description |
---|---|---|
Edit-AXModelManifest |
axutil edit |
Modify the properties of a model's manifest. For more information, see How to: View or Change the Manifest Properties of a Model and Edit-AXModelManifest. |
Export-AXModel |
axutil export |
Export a model to an .axmodel file. For more information, see How to: Export and Import a Model and Export-AXModel. |
Export-AXModelStore |
axutil exportstore |
Export a Microsoft Dynamics AX model store to an .axmodelstore file. For more information, see How to: Export and Import a Model Store and Export-AXModelStore. |
There is no equivalent Windows PowerShell cmdlet. |
axutil genlicense |
ISVs use this command to generate a customer-specific license file for a solution. |
Get-AXModel |
axutil view |
Return a list of the models in the model store, or a list of the elements in a specific model or model file. Note Get-AXModel –details and axutil view /verbose return slightly different information. For more information, see How to: View and Verify Contents of a Model and Get-AXModel. |
Get-AXModelManifest |
axutil manifest |
Retrieve the properties of a model file. For more information, see How to: View and Verify Contents of a Model and Get-AXModelManifest. |
Get-Help <cmdlets> |
axutil /help |
Get help for a command. |
Grant-AXModelStore |
axutil grant |
Grant the account that an instance of Application Object Server (AOS) runs as permissions to the model store in the Microsoft Dynamics AX database. For more information, see Grant-AXModelStore. |
Import-AXModelStore |
axutil importstore |
Import a model store from a file to a database. For more information, see How to: Export and Import a Model Store and Import-AXModelStore. |
Initialize-AXModelStore |
axutil schema |
Create an empty model store that is associated with the specified schema, update the existing schema for a model store, or remove a non-default model store. For more information, see How to: Create, Drop, or Reinitialize a Model Store and Initialize-AXModelStore. |
Install-AXModel |
axutil import |
Install a model from an .axmodel file to the model store. For more information, see How to: Export and Import a Model and Install-AXModel. |
Move-AXModel |
axutil move |
Move the content of one model in the Microsoft Dynamics AX model store to another model in the same layer. For more information, see How to: View or Change the Manifest Properties of a Model and Move-AXModel. |
New-AXModel |
axutil create |
Create an empty model in a Microsoft Dynamics AX model store. You can specify properties for the model by passing in either a manifest file or a series of manifest properties. For more information, see How to: Create a New Model from the Command Line and New-AXModel. |
Optimize-AXModelStore |
axutil optimize |
Run a series of steps to optimize the model store for run-time performance. For more information, see How to: Optimize a Model Store for Runtime and Optimize-AXModelStore. |
Set-AXModelStore |
axutil set |
Set a flag in the model store that indicates the action that is taken when a model is modified. If the -InstallMode parameter is used, a dialog box appears when the Microsoft Dynamics AX client is started after a model has been modified. From the dialog box, you can open the Model code upgrade checklist. By default, when you import a model from Windows PowerShell or AXUtil, the installation mode is set to display the Model code upgrade checklist when the Microsoft Dynamics AX client starts. For more information, see Set-AXModelStore. |
Test-AXModelData |
axutil exists |
Verify whether a specified model or layer contains data. For more information, see How to: View and Verify Contents of a Model and Test-AXModelData. |
Uninstall-AXModel |
axutil delete |
Remove a model from the model store in the Microsoft Dynamics AX database. For more information, see How to: Remove (Uninstall) a Model and Uninstall-AXModel. |
Windows PowerShell
After you install Microsoft Dynamics AX, the applicable Windows PowerShell cmdlets are available from the Microsoft Dynamics AX Management Shell. For more information about other Windows PowerShell cmdlets, and for information about how to write scripts, see Administering Microsoft Dynamics AX by using Windows PowerShell.
To obtain help for any Windows PowerShell cmdlet, use the Get-Help cmdlet.
Access Windows PowerShell
On the Start menu, point to All Programs, point to Administrative Tools, and then click Microsoft Dynamics AX Management Shell.
At the Windows PowerShell command prompt, PS C:\>, enter the Get-Help command, and then press ENTER.
Get-Help AXModel
The command in this example returns a list of all model-related cmdlets.
Get-Help Export-AXModel -Full
The code in this example retrieves help for the Export-AXModel cmdlet.
AXUtil
After you install Microsoft Dynamics AX, the applicable AXUtil commands are available from the directory for Microsoft Dynamics AX Management Utilities.
To view the Help for AXUtil, enter the command AXUtil /?.
Access AXUtil
On the Start menu, click Command prompt.
Navigate to the directory for the management utilities. Typically, the location of this directory is %ProgramFiles%\Microsoft Dynamics AX\60\ManagementUtilities.
At the command prompt, type the following command, and then press ENTER.
axutil /?
This command displays the Help for AXUtil.
See also
Models, Layers, and the Model Store
Administering Microsoft Dynamics AX by using Windows PowerShell