Hi there,
Anyone there not liking Automation? I love it. However there are times, we need to look back and analyze the manual way of doing things, situation demands at times :). Deployment is one of them we are going to talk about here!
I'm sure you would have had some experience deploying the application packages, reports, etc., into Local AX7 VM using the PowerShell Cmdlets. The same approach would still work with Azure Hosted VMs too with little changes.
I was going thru the deployment document where I found the way to redeploy all the reports which also includes your custom reports. You normally execute this at the end, after the package is successfully deployed,
Here is the PowerShell cmdlet that works with local hosted VM,
This works perfectly well with local hosted VM, but not with the Azure Hosted VM. The problem is, there is no such folder called C:\Packages\ in Azure Hosted VM.
Smartly found the replacement folder for C:\Packages which is J:\AosService\PackagesLocalDirectory (this is case with version 7.0.1265.3015). And, tried the following:
J:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1
Did it work? Well, NO :(. It was not working either, but throwing the following error:
Anyone there not liking Automation? I love it. However there are times, we need to look back and analyze the manual way of doing things, situation demands at times :). Deployment is one of them we are going to talk about here!
I'm sure you would have had some experience deploying the application packages, reports, etc., into Local AX7 VM using the PowerShell Cmdlets. The same approach would still work with Azure Hosted VMs too with little changes.
I was going thru the deployment document where I found the way to redeploy all the reports which also includes your custom reports. You normally execute this at the end, after the package is successfully deployed,
Here is the PowerShell cmdlet that works with local hosted VM,
- Type Set-ExecutionPolicy UnRestricted
- Select 'Y' when prompted and hit 'Enter'
- Execute this script command: C:\Packages\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1
This works perfectly well with local hosted VM, but not with the Azure Hosted VM. The problem is, there is no such folder called C:\Packages\ in Azure Hosted VM.
Smartly found the replacement folder for C:\Packages which is J:\AosService\PackagesLocalDirectory (this is case with version 7.0.1265.3015). And, tried the following:
J:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1
Did it work? Well, NO :(. It was not working either, but throwing the following error:
Get-ItemProperty : Property BinDir does not exist at path
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dynamics\Deployment.
At J:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask
\DeployAllReportsToSSRS.ps1:64 char:36
+ ... Location = (Get-ItemProperty -Path Registry:HKEY_LOCAL_MACHINE\...
+ CategoryInfo : InvalidArgument: (BinDir:String)
Looked at the specified path at windows registry, there is no such entry for "BinDir" but does exist in local hosted VM. Creating a new entry in the registry settings does not seem the good idea for me, so dig little deeper and found that BinDir is one of the optional parameters of the PowerShell Script that can be specified along with the command.
So, modified the PowerShell script to the below resolved the problem and was able to deploy the reports manually!
J:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "J:\AosService\PackagesLocalDirectory"
Cheers!