Share via


Install-AXModel

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.

Install-AXModel

Installs a model from an .axmodel file to the Microsoft Dynamics AX model store database.

Syntax

Parameter Set: Default
Install-AXModel -File <String> [-Config <String> ] [-Conflict <String> ] [-CreateParents] [-Database <String> ] [-Details] [-NoOptimize] [-NoPrompt] [-Replace <String> ] [-Server <String> ] [-TargetLayer <String> ] [ <CommonParameters>]

Detailed description

The Install-AXModel cmdlet installs a model from a model file to the Microsoft Dynamics AX model store database. You can specify the action to be taken in the event of a conflict with element IDs from another model in the same layer. By default, after this cmdlet is run, the system takes steps to optimize the database, such as re-indexing. If you are importing many models, you may want to set the -Optimize parameter to False to postpone optimization until after all of the models have been imported.

You cannot specify the layer where the model should be installed. It will be installed to the same layer that it was exported from.

Parameters

-Config<String>

Specifies an Application Object Server (AOS) configuration to use to determine the model store database and server name. The default value is the currently active configuration. This parameter cannot be used with the -Database or -Server parameters. If no -Database, -Server, or -Config parameters are supplied, the default configuration is used.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Conflict<String>

Specifies what to do in the event that a conflict of element IDs between the model being imported and another model in the same layer is found. Possible values include Reject, Push, or Overwrite. Reject stops the import process. Push duplicates the model element into the related update layer. For example, for the ISV layer, the update layer is ISP. Overwrite replaces the existing model element with the imported model element. The default value is Reject.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CreateParents

Specifies that if you install a child element that does not have a parent in the model store , a new parent element should be created. By default, this option is off, so that if child elements that do not have parents are encountered, the import process is stopped. In general, we recommend that you avoid the use of this parameter, if possible. If you are importing multiple models that have dependencies, we strongly recommend that you import them in the correct order, so that the use of the -CreateParents parameter is not required. If you must use -CreateParents, then we recommend that you use it in combination with the -Conflict parameter set to Push, and then resolve issues with the parent elements in AOT. Note that if you use the -CreateParents parameter, a new model of Category virtual will be created.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Database<String>

Specifies the Microsoft Dynamics AX model store database. This parameter cannot be used with the -Config parameter. If the -Database parameter is specified without a -Server parameter, the default server value of "(local)" is used.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Details

Specifies that a detailed description of each model should be displayed.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-File<String>

The .axmodel file to be installed.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NoOptimize

Specifies that the system skip steps to optimize the database, such as re-indexing. If you are installing many models, you may want to set the -NoOptimize parameter. After installation is finished, you would then call the Optimize-AXModelStore cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NoPrompt

Specifies that no prompts be shown during the import of an .axmodel file.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Replace<String>

Specifies a model to be replaced by the model that is being installed.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Server<String>

Specifies the server that hosts the Microsoft Dynamics AX model store database. This parameter can only be used with the -Database parameter--it cannot be used by itself.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TargetLayer<String>

Specifies which layer a conflict model should be created in. It must be a layer above the layer that the model itself is imported into. The default value is the patch layer of the layer that the model itself is imported into, or, if importing into a patch layer, to the USR layer.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see about_CommonParameters https://go.microsoft.com/fwlink/?LinkID=113216

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • ModelManifest

    Returns the model manifest class.

Examples

This example installs the MyModel file into the same layer that it was exported from. Any conflicts will be pushed to the related update layer.

PS C:\>Install-AXModel -File MyModel.axmodel -Conflict Push
PS C:\>
                        

How to: Export and Import a Model

Uninstall-AXModel

Copyright Microsoft Corporation. All rights reserved.