< Back

Export-AxModelV2

Sat Jan 11, 2020 8:08 am

NAME Export-AxModelV2



SYNOPSIS

Export AX 2012 model





SYNTAX

Export-AxModelV2 [-DatabaseServer <String>] [-ModelstoreDatabase <String>] [-Path <String>] [-Name <String>] [-Id

<String>] [-Layer <String>] [-ShowOriginalProgress] [-OutputCommandOnly] [<CommonParameters>]





DESCRIPTION

Export AX 2012 model from 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 location where you want the file to be exported



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



Required? false

Position? named

Default value $Script:DefaultTempPath

Accept pipeline input? false

Accept wildcard characters? false



-Name <String>

Name of the AX 2012 model that you are looking for



Accepts wildcards for searching. E.g. -Name "ISV*MODULE*"



Default value is "*" which will search for all models



Required? false

Position? named

Default value *

Accept pipeline input? false

Accept wildcard characters? false



-Id <String>

Id of the AX 2012 model that you are looking for



Accepts wildcards for searching. E.g. -Id "2*"



Default value is "*" which will search for all models



Required? false

Position? named

Default value *

Accept pipeline input? false

Accept wildcard characters? false



-Layer <String>

Layer where the AX 2012 model that you are looking for should reside



Accepts wildcards for searching. E.g. -Layer "IS*"



Default value is "*" which will search for models in all layers



Required? false

Position? named

Default value *

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 the script to execute the command in hand



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:\\>Get-AxAosInstance | Export-AxModelV2



This will fetch all the AX 2012 AOS instances that are configured on the machine.

Foreach of the instances it will export all AX 2012 Models into a sub folder to "c:\\temp\\ax2012.tools".









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



PS C:\\>Export-AxModelV2 -DatabaseServer localhost -ModelstoreDatabase MicrosoftDynamicsAx_model -Name *CUS*



This will fetch all the AX 2012 AOS instances that are configured on the machine.

Foreach of the instances it will export all AX 2012 Models into a sub folder to "c:\\temp\\ax2012.tools".











RELATED LINKS