how to use AXUtil.exe and AX power cell. ax 2012

how to use AxUtil.exe  - Ax 2012 : (axutil.exe  /? This command displays the Help for AXUtil. )

C:\Windows\system32>cd C:\Program Files\Microsoft Dynamics AX\60\Server\Microsof
tDynamicsAX\bin
C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin>Axutil.
exe -?
AXUtil 6.3 - Microsoft Dynamics AX Admin Utility (6.3.164.0)


Usage: AXUtil.exe command command-parameter <model-store>


Supported commands:


  export - Export a model to an .axmodel file.
  import - Import a model from an .axmodel file.
  delete - Delete one or more models in a layer.
  create - Create a new blank model.
  move - Move a model to another same-layer model.
  view - View the content of a model or an .axmodel file.
  edit - Edit the model manifest properties of a model in the model store.
  list - Display a list of models in the model store.
  exists - Verify if one or more models in a layer contains model elements.
  schema - Create or update the model store schema.
  optimize - Optimize the model store for runtime performance.
  manifest - Retrieve the manifest for a model, model file, or template.
  set - Set model store settings.
  grant - Set permissions for creating model store schema.
  exportstore - Export the model store to an .axmodelstore file.
  importstore - Import the model store from an .axmodelstore file.
  genLicense - Generate a license file.
  idkeep - Retain the ID of the existing installation.
  refreshrolecache - Clear and re-build role permission caches.


Supported command-parameters:


  axutil export {/model:<model> | @modelxml} /file:filename [/key:SNK-file]
  axutil import /file:filename{,filename}
                [/conflict:{reject|push|overwrite} [/targetlayer:name]]
                [/replace:<model>{,<model>}] [/createparents]
                [/verbose] [/noOptimize] [/noPrompt]
  axutil delete {/model:<model> | @modelxml | /layer:name}
                [/noPrompt] [/verbose]
  axutil create {/model:<model> /layer:name <manifest>} | @modelxml
  axutil move {/model:<model> | @modelxml /targetModel:<model>}
  axutil view {/model:<model> | @modelxml | /file:filename} [/verbose]
  axutil edit {/model:<model> | @modelxml} <manifest>
  axutil list [{/model:<model> | @modelxml}] [/layer:name] [/verbose]
  axutil exists {/model:<model> | @modelxml | /layer:name}
  axutil manifest [/model:<model> | /file:filename] [/xml]
  axutil set {/installmode | /noinstallmode}
  axutil schema [/aosaccount:account]  [ [/schemaname:name] | [/drop:name] ]
                [/noprompt]
  axutil optimize
  axutil grant /aosaccount:account [/schemaname:name]
  axutil exportstore /file:filename [/verbose]
  axutil importstore {/file:filename [/idconflict:{reject|overwrite}]
                [[/schemaname:name] | [/backupschema:name]]
                | /apply:schemaname [/backupschema:name] }
                [/verbose] [/noPrompt]
  axutil genlicense /file:licensefile /certificatepath:filepath
                /licensecode:name /customer:name
                /serialnumber:number /password:value [/expirationdate:date]
                [/usercount:count]
  axutil idkeep /idfile:idfilename [/renamefile:renamefilename{,renamefilename}]
 [/verbose] [/noprompt]
  axutil refreshrolecache
where
  <model-store> = [/db:database] [/s:server] | [/config[[:aosinstance]:name]
  <model>       = model-name | '(' model-name , publisher ')' | model-id
  <manifest>    = {@modelxml | /manifest:<property>=<value>}

Parameters:

  /db:database
    Specifies the database name for the model store on the server.
    The database must exist before the connection. It cannot be used with
    the /config parameter. Default: tempdb.
    If no <model-store> parameters are used at all, /config is the default.
  /s:server
    Specifies the server name for the model store database.
    This parameter cannot be used with /config parameter. Default: "(local)".
    If no <model-store> parameters are used at all, /config is the default.
  /config[[:aosinstance]:name]
    Specifies an Application Object Server (AOS) configuration to use to
    determine the model store database and server name. The default for AOS
    instance is the name of the "01" AOS instance on the local computer. The
    default for name is the name of the current configuration on the specified
    instance. This parameter cannot be used with the /db or /s parameters. If
    no <model-store> parameters are supplied, /config is used by default.
    Example: axutil export /model:Test /config:DynamicsAx1:CoreDevelopment
  /noPrompt
    Do not prompt for confirmation before completing the selected command.
    Default: Do prompt.
  /model:{model-name | '(' model-name , publisher')' | model-id}
    Specifies one model in the model store. The model can be identified by:
      * Name - name that uniquely identifies exactly one model in the store.
      * Two-part unique name - values must be contained in parentheses,
          and comma separated.
      * ID - the model store specific number which can be found using the
          list command.
    Example: axutil exists /model:Test /db:axmodelstore /server:axserver
  /layer:name
    Specifies one of the 16 supported layers.
    Example: axutil delete /layer:var /db:axmodelstore /server:axserver
  /conflict:{reject|push|overwrite}
    Specifies the action to take on import when a model element exists
    in the destination model.
      * Reject stops the import process.
      * Push duplicates the model element into the next higher layer.
      * Overwrite replaces the existing model element with the imported model
        element.
    Default: /conflict:reject.
  /idconflict:{reject|overwrite}
    Specifies the action to take on importstore when a model element exists
    in the destination model store with the same origin but different ID.
      * Reject stops the import process.
      * Overwrite replaces the existing model element with the imported model
        element.
    Default: /idconflict:reject.
  /targetlayer:name
    Used with the import command and /conflict:push parameter. Specifies
    which of the 16 supported layers to create a conflict model in.
  /targetmodel:name
    Used with move command for moving the content from one model to the
    target model.
  /replace:<model>{,<model>}
    Specifies one or more models to be physically replaced by imported model.
    Example: axutil import /file:newname /replace:oldname
  /createparents
    Used with the import command to create parents. If a child-element is
    imported, but its parent element is not in the model store, a fake parent
    is created in the model store. Default: Off.
  /noOptimize
    When used with the import command, the program will not optimize the model
    store automatically for optimal runtime performance.
    Default: Additional optimization actions done.
  /noInstallMode, /installmode
    Impacts the model store install mode, which, if set, triggers a prompt
    inside Microsoft Dynamics AX to complete certain actions. Notice that
    import, delete and move commands implicitly set the install mode.
    Example: axutil set /noInstallMode
  /file:filename{,filename}
    Specifies the name of the .axmodel file or .axmodelstore file.
    Example: axutil import /file:test.axmodel /db:axmodelstore
  /aosaccount:account
    Specifies the AOS account used to set permissions for the model
    store and stored procedures. Use this parameter only with grant and schema
    commands.
    Example: axutil schema /aosaccount:"NT AUTHORITY\NETWORK SERVICE" /db:ax
  @modelxml
    Specifies the name of a model XML file that follows the appropriate
    schema, and contains the manifest properties of a model. The schema of
    the file must follow the documented schema. Use axutil manifest /xml to
    output a sample manifest.
  /manifest:<property>=<value>
    Specifies a model manifest property setting. Any value described in the
    model XML file schema can be used with valid values. For more than one
    property consider using the @modelxml variant.
    Example: axutil create /model:Test /manifest:Version="1.0.0.0"
  /key:SNK-file
    Specifies a key file generated with the Strong Name utility. The model
    file will be delay signed if the key file only contains a public key.
  /file:licensefile
    Specifies the name of the generated license file.
  /certificatepath:filepath
    Specifies the path to the certificate used to generate the license file.
  /licensecode:name
    Specifies the name of the licencode code used to generate the license file.
  /customer:name
    Specifies the customer name used to generate the license file.
  /serialnumber:number
    Specifies the serial number used to generate the license file.
  /password:value
    The value of this parameter must match the password of the given
    certificate when generating a license file.
  /expirationdate:date
    Specifies expiration date of the generated license.
    This parameter is optional.
  /usercount:count
    Specifies the number of simultaneous users for the the generated license.
    This parameter is optional.
  /schemaname:name
    Specifies a valid SQL schema name. Default: dbo.
    Example: axutil importstore /file:new /schemaname:TransferSchema
  /backupschema:name
    Specifies a valid SQL schema name and is used to backup dbo
    schema if provided.
    Example: axutil importstore /file:new /backupschema:dbo_backup
  /drop:name
    Used with the schema command to drop a backup schema that is populated
    by the importstore command. The schema must be a valid existing schema
    and cannot be [dbo].
    Example: axutil schema /drop:dbo_backup.
  /apply:schemaname
    Used with importstore command to apply a new model store already
    imported in a staging schema.
    Example: axutil importstore /apply:TransferSchema
  /idfile:idfilename
    Used with the idkeep command to provide an ID of the existing installation
  /renamefile:renamefilename[,renamefilename]
    Used with the idkeep command to rename elements across different installatio
ns
  /verbose
    Specifies that extended information be output. Default: Non-verbose.
    Example: axutil view /file:test.axmodel /verbose
  /?
    Displays help for all parameters.
C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin>




AX Power cell:


Get-Help AXModel 
The command in this example returns a list of all model-related cmdlets.


Get-Help Export-AXModel -Full
The code in this example retrieves help for the Export-AXModel cmdlet


All the AXModel related cmdlet are given below. syntax can be taken by specific cmdlets




PS C:\Windows\system32> Get-Help AXModel
Name                              Category  Module                    Synopsis
----                              --------  ------                    --------
Edit-AXModelManifest              Cmdlet    AxUtilLib.PowerShell      Modifi...
Export-AXModel                    Cmdlet    AxUtilLib.PowerShell      Export...
Export-AXModelStore               Cmdlet    AxUtilLib.PowerShell      Export...
Get-AXModel                       Cmdlet    AxUtilLib.PowerShell      Return...
Get-AXModelManifest               Cmdlet    AxUtilLib.PowerShell      Retrie...
Grant-AXModelStore                Cmdlet    AxUtilLib.PowerShell      Grants...
Import-AXModelStore               Cmdlet    AxUtilLib.PowerShell      Import...
Initialize-AXModelStore           Cmdlet    AxUtilLib.PowerShell      Initia...
Install-AXModel                   Cmdlet    AxUtilLib.PowerShell      Instal...
Move-AXModel                      Cmdlet    AxUtilLib.PowerShell      Moves ...
New-AXModel                       Cmdlet    AxUtilLib.PowerShell      Create...
Optimize-AXModelStore             Cmdlet    AxUtilLib.PowerShell      Runs a...
Set-AXModelStore                  Cmdlet    AxUtilLib.PowerShell      Sets a...
Test-AXModelData                  Cmdlet    AxUtilLib.PowerShell      Verifi...
Uninstall-AXModel                 Cmdlet    AxUtilLib.PowerShell      Remove...

PS C:\Windows\system32>

Comments