Header Ads Widget

🚀 How to Deploy SSRS Reports in D365FO Using PowerShell Easily

 

🧾 Why Use PowerShell for SSRS Deployment?

In Dynamics 365 Finance and Operations, SSRS reports are often deployed after changes like:

  • New report creation

  • Design adjustments

  • Dataset modifications

Instead of manual Visual Studio deployment, PowerShell scripts offer a fast, reliable, and batch-compatible way to handle deployment from the AOS.


⚡ Prerequisites

Before running PowerShell:

  • Run PowerShell as Administrator

  • Ensure AOS Service is stopped

  • Make sure no build or sync process is running

  • Navigate to this directory:

    makefile
    K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\

🔁 Option 1: Deploy All Reports

To deploy all available SSRS reports across all models/modules:

powershell
.\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory"

📝 This is commonly used after a major build or package import.


🧩 Option 2: Deploy All Reports from a Specific Module

Let’s say you’ve made changes in a custom module called RealEstateMgmt. Use:

powershell
.\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory" -Module RealEstateMgmt

📌 Replace RealEstateMgmt with your actual model/module name.


🎯 Option 3: Deploy a Single Specific Report

Want to deploy just one report? Example: LeaseContractSummary.Report

powershell
.\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory" -ReportName LeaseContractSummary.Report

Ensure that .Report suffix is used (this is the SSRS design name).


📦 Pro Tip: Combine with Build Scripts

You can combine PowerShell report deployment inside your custom deployment automation pipeline or during post-build events to make your process CI/CD-ready.


🛡️ Final Tips

✅ Best Practice🧠 Recommendation
Run as AdminAlways launch PowerShell with Administrator rights
Validate Reports Before DeployingRun reports in preview mode inside VS before pushing to SSRS
Use Module Filter WiselyUse -Module to reduce overhead instead of deploying all
Use ReportName for Debugging FastDeploy specific report during debugging for faster results
Restart AOS Service (if needed)Restart IIS or AOS if reports don’t reflect changes immediately

📌 Summary

PowerShell is a powerful tool in the D365FO developer toolkit. Whether you’re deploying a single report or all module reports, using the DeployAllReportsToSSRS.ps1 script ensures a smooth, command-line-driven SSRS deployment process—perfect for development, testing, and release cycles.

Post a Comment

0 Comments