AX PS Scripts - AX 2012 - Using config parameter

AX 2012 comes with a few useful PowerShell scripts (via the Dynamics AX 2012 Management Shell) that allows you to perform some degree of management; this is also possible using the AxUtil executable, but using the PS seems more nowadays.
Now, one of the things in using the PS scripts is to pay attention to what instance you are running your commands against, in case you have multiple instances running on that machine. So, do not neglect the -Config parameter. You might end up, if you are not careful enough to overwrite another instance that the one you want.
The value of the -Config parameter is the name of the AOS (you take this from the Microsoft Dynamics AX 2012 Sever Configuration -> Application Object Server Instance).

As an example, this is what you will get if the AOS from the Default Configuration doesn't exist anymore:

PS C:\Windows\system32> Uninstall-AxModel -Layer cus
Uninstall-AXModel : The pipeline has been stopped.
At line:1 char:18
+ uninstall-axmodel <<<<  -layer cus
    + CategoryInfo          : OperationStopped: (:) [Uninstall-AXModel], Pipel
   ineStoppedException
    + FullyQualifiedErrorId : Default AOS instance was not found in the regist
   ry.,Microsoft.Dynamics.AX.Framework.Tools.ModelManagement.PowerShell.Unins
  tallAXModelCommand
 

No comments:

Post a Comment