< Back

Import-AxModelV2

Sat Jan 11, 2020 8:15 am

NAME Import-AxModelV2



SYNOPSIS

Import AX 2012 model





SYNTAX

Import-AxModelV2 [-DatabaseServer <String>] [-ModelstoreDatabase <String>] [-Path <String>] [-ConflictMode

<String>] [-Detailed] [-CreateParents] [-NoOptimize] [-NoPrompt] [-ShowOriginalProgress] [-OutputCommandOnly]

[<CommonParameters>]





DESCRIPTION

Import AX 2012 model into the AX 2012 Model store





PARAMETERS

-DatabaseServer <String>

Server name of the database server



Default value is: "localhost"



Required? false

Position? named

Default value $Script:ActiveAosDatabaseserver

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-ModelstoreDatabase <String>

Name of the modelstore database



Default value is: "MicrosoftDynamicsAx_model"



Note: From AX 2012 R2 and upwards you need to provide the full name for the modelstore database. E.g.

"AX2012R3_PROD_model"



Required? false

Position? named

Default value $Script:ActiveAosModelstoredatabase

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Path <String>

Path to the folder containing the AX model file(s) that you want to import



The cmdlet will traverse all sub folders for files and import them based on their names



Required? false

Position? named

Default value $Script:DefaultTempPath

Accept pipeline input? false

Accept wildcard characters? false



-ConflictMode <String>

Instructs the cmdlet to handle conflicts



The list of options is:

"Reject"

"Push"

"Overwrite"



Required? false

Position? named

Default value Overwrite

Accept pipeline input? false

Accept wildcard characters? false



-Detailed [<SwitchParameter>]

Instruct the cmdlet to output detailed element names and AOT path while importing the model



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-CreateParents [<SwitchParameter>]

Instruct the cmdlet to create missing parents on import



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-NoOptimize [<SwitchParameter>]

Instruct the cmdlet to skip the optimization on import



This makes sense if you are import more than 1-2 AX 2012 models at the same time



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-NoPrompt [<SwitchParameter>]

Instruct the cmdlet not to prompt you with anything



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-ShowOriginalProgress [<SwitchParameter>]

Instruct the cmdlet to show the standard output in the console



Default is $false which will silence the standard output



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-OutputCommandOnly [<SwitchParameter>]

Instruct the cmdlet to output a script that you can execute manually later



Using this will not import any AX 2012 models into the model store



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

System.String





NOTES





Author: M??????tz Jensen (@Splaxi)



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Import-AxModelV2 -Path "c:\\temp\\ax2012.tools\\dev-models"



The cmdlet will look for all the AX 2012 models located in "c:\\temp\\ax2012.tools\\dev-models" or any of its sub

folders.

The ConflictMode is set to the default value of "OverWrite".

The Database Server is set to the default value of "localhost".

The Modelstore Database is set to the default value of "MicrosoftDynamicsAx_model".









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Import-AxModelV2 -Path "c:\\temp\\ax2012.tools\\dev-models" -ShowOriginalProgress



The cmdlet will look for all the AX 2012 models located in "c:\\temp\\ax2012.tools\\dev-models" or any of its sub

folders.

The ConflictMode is set to the default value of "OverWrite".

The Database Server is set to the default value of "localhost".

The Modelstore Database is set to the default value of "MicrosoftDynamicsAx_model".



It will show the original progress output for the import of the model file in real time.











RELATED LINKS