When we started using AXUtil.exe in Dynamics AX 2012 it was a bit scary in the beginning but I consider it easy to use after having spent hours upon hours massaging model files on different installations. It is a bit of a black-box, I know. But still it went from causing sweaty armpits to being easy-peasy handling modelstore updates using AXutil.
Now with the New Dynamics AX we are introduced to AXUpdateInstaller.exe and we are back to dark spots on the t-shirt where the arms meet the torso. But I bet that we will get used to this like we did with AXutil … I hope …
One thing that I have learned the hard way is to not have Visual Studio and the Application View opened on the same machine I am deploying to. That gives an error when the installer tries to unzip the files from the package to the service folders.
The error is something like this:
<Log> <Time>2016-03-02T09:32:43.5149415+00:00</Time> <MachineName>mymachine</MachineName> <StepID>3</StepID> <Message>The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: A positional parameter cannot be found that accepts argument 'Package deployment failed as the extraction of the package zip file failed.'.</Message> </Log>
The text is picked up from the runbook file.
So I went through all the normal stuff such as disk space, access rights to the folder, test-expanding the folder and so on. Nothing looked suspicious.
Next step was to look at what step 3 actually does that makes it stop. Going a bit upwards in the runbook file we get the actual contents of each step. For step 3 it is:
<Step> <ID>3</ID> <Description>Update script for service model: AOSService on machine: AX7SORAS02-1</Description> <MachineName>AX7SORAS02-1</MachineName> <ServiceModelName>AOSService</ServiceModelName> <ScriptToExecute> <FileName>AutoUpdateAOSService.ps1</FileName> <Automated>true</Automated> <Description>update AOS service</Description> <RetryCount>0</RetryCount> <InvokeWithPowershellProcess>false</InvokeWithPowershellProcess> </ScriptToExecute>...
The interesting part is the filename AutoUpdateAOSService.ps1. The scripts run by AXUpdateInstaller for this is located in the deployment folder in AOSService\Scripts.
Using Windows PowerShell ISE you are actually able to debug your way through the script.
When you have located the error you can use AXUpdateInstaller to mark the step as completed and it will automatically move on to the next step.