< Back

Import-AXModelStoreV2

Sat Jan 11, 2020 8:15 am

NAME Import-AXModelStoreV2



SYNOPSIS

Import an AX 2012 modelstore file





SYNTAX

Import-AXModelStoreV2 [-DatabaseServer <String>] [-ModelstoreDatabase <String>] [-SchemaName <String>] [-Path

<String>] [-IdConflictMode <String>] [-ShowOriginalProgress] [<CommonParameters>]



Import-AXModelStoreV2 [-DatabaseServer <String>] [-ModelstoreDatabase <String>] [-SchemaName <String>] [-Apply]

[-ShowOriginalProgress] [<CommonParameters>]



Import-AXModelStoreV2 [-DatabaseServer <String>] [-ModelstoreDatabase <String>] [-ShowOriginalProgress]

[-OutputCommandOnly] [<CommonParameters>]





DESCRIPTION

Import an AX 2012 modelstore file into the modelstore database





PARAMETERS

-DatabaseServer <String>

Server name of the database server



Default value is: "localhost"



Required? false

Position? named

Default value $Script:ActiveAosDatabaseserver

Accept pipeline input? false

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? false

Accept wildcard characters? false



-SchemaName <String>

Name of the schema to import the modelstore into



Default value is: "TempSchema"



Required? false

Position? named

Default value TempSchema

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

Path to the location where you want the file to be exported



Default value is: "c:\\temp\\ax2012.tools"



Required? false

Position? named

Default value (Join-Path $Script:DefaultTempPath "MicrosoftDynamicsAx.axmodelstore")

Accept pipeline input? false

Accept wildcard characters? false



-IdConflictMode <String>

Parameter to instruct how the import should handle ID conflicts if it hits any during the import



Valid options:

"Reject"

"Push"

"Overwrite"



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Apply [<SwitchParameter>]

Instruct the cmdlet to switch modelstore with the SchemaName in as the current code



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 only generate the needed command and not execute it



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-AXModelStoreV2 -SchemaName TempSchema -Path C:\\Temp\\ax2012.tools\\MicrosoftDynamicsAx.axmodelstore



This will execute the cmdlet with some of the default values.

This will work against the SQL server that is on localhost.

The database is expected to be "MicrosoftDynamicsAx_model".

The import will import the modelstore into the "TempSchema".

The path where the modelstore file you want to import must exists is:

"c:\\temp\\ax2012.tools\\MicrosoftDynamicsAx.axmodelstore".











RELATED LINKS