Compartir a través de


Get-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.

Get-AXModel

Returns a list of the models in the model store, or a list of elements from a particular model or model file.

Syntax

Parameter Set: Default
Get-AXModel [-All] [-Config <String> ] [-Database <String> ] [-Details] [-File <String> ] [-Layer <String> ] [-ManifestFile <String> ] [-Model <String> ] [-Server <String> ] [ <CommonParameters>]

Detailed description

The Get-AXModel cmdlet returns a list of the models in the model store, or a list of elements from a particular model or model file. By default, system-generated models are only returned if they contain data.

Parameters

-All

Specifies that a list of all models be returned, whether or not they contain data. If you do not use this parameter, system-generated models that do not contain data are not returned.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-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 or Server 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

-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 additional details about the contents of a model or model file should be returned. Details returned include the Path, Name, ElementHandle, ParentHAndle, ElementType, and InModel.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-File<String>

Specifies the name and location of an .axmodel file.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Layer<String>

Specifies the three-letter name of the Microsoft Dynamics AX layer to return, for example, VAR.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ManifestFile<String>

Specifies an XML file that identifies a model.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Model<String>

Specifies the name of the model to retrieve.

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

<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

Example 1: SYS layer models

This example returns a list of the models, their IDs, names, versions, and publishers in the SYS layer.

PS C:\>Get-AXModel -Layer SYS
						
ID Layer Model Version Publisher ----- ----- ---------------------------- ---------- ---------------------------
1 Sys SYS Model 1.0.0.0
17 Sys SYS Application 6.0.0.0 Microsoft Corp
21 Sys SYS Labels 6.0.0.0 Microsoft Corp

Example 2: USR layer models

This example returns a list of the model "USR Model".

PS C:\>(Get-AXModel -Model "USR Model" -Details).Elements | Out-String
Path          : \Forms\TaxYearlyComReport_IT\Designs\DesignList\TaxData

Name : TaxData
ElementHandle : 467440
ParentHandle : 467429
ElementType : FormControl
InModel : True
ModelId : 0
Layer : Sys
Path : \Forms\TaxYearlyComReport_IT\Designs\DesignList\TaxPayer
Name : TaxPayer
ElementHandle : 467436
ParentHandle : 467429
ElementType : FormControl
InModel : True
ModelId : 0
Layer : Sys
Path : \Forms\TaxYearlyComReport_IT\Designs\DesignList\Writer
Name : Writer
ElementHandle : 467437
ParentHandle : 467429
ElementType : FormControl
InModel : True
ModelId : 0
Layer : Sys

Path : \Jobs\Job1
Name : Job1
ElementHandle : 554360
ParentHandle : 0
ElementType : Job
InModel : True
ModelId : 0
Layer : Sys

Path : \SSRS Reports\Report Datasources\DynamicsAXOLAP
Name : DynamicsAXOLAP
ElementHandle : 505471
ParentHandle : 0
ElementType : SSRSReportDatasource
InModel : True
ModelId : 0
Layer : Sys
PS C:\>
                        

How to: View and verify contents of a model

Copyright Microsoft Corporation. All rights reserved.