Categories: DatabasesNews

Deploy SSRS Projects with Two New PowerShell Commands from Blog Posts – SQLServerCentral

2 min read

I built two new PowerShell commands to deploy SSRS projects, and they have finally been merged into the ReportingServicesTools module. The commands are Get-RsDeploymentConfig & Publish-RsProject. While the Write-RsFolderContent command did already exist, and is very useful, it does not support deploying the objects in your SSRS Project to multiple different folders in your report server. These two new commands can handle deployment to multiple folders.

The concept is fairly simple, first you run the Get-RsDeploymentConfig
command to pull in all the deployment-target details from the SSRS project file. In SSRS projects you can have multiple deployment configurations, so you can specify which configuration you want to use by supplying the name of that configuration for the
-ConfigurationToUse parameter. This will give you back a PSObject with all the info it collected.


After that, you need to add the URL of the report portal manually (unfortunately, these are not included in the SSRS Project config files).

You can put all of that together and see the results like this:

$RSConfig = Get-RsDeploymentConfig RsProjectFile C:sourcereposFinancial ReportsSSRS_FRSSRS_FR.rptproj ConfigurationToUse Dev01 $RSConfig | Add-Member PassThru MemberType NoteProperty Name ReportPortal Value http://localhost/PBIRSportal/

$RSConfig

Once that looks good to you, all you have to do is pipe that object to the Publish-RsProject command, and your deployment should start.

$RSConfig | Publish-RsProject

Some quick notes:

  • Obviously, the account running these commands will need a copy of the SSRS project it can point to, as well as the necessary credentials to deploy to the SSRS/PRIRS server you point it to.
  • For the Get-RsDeploymentConfig command, the SSRS project you are using must be in the VS 2019 project format. Otherwise, the command won’t know where to look for the correct info.
  • If you don’t know the name of the configuration you want to use, just point Get-RsDeploymentConfig to the project file, and it will give you back a list of configuration options to choose from.
  • Make sure you run Update-Module ReportingServicesTools
    to get these new commands.

FYI: I only had two SSRS projects available to test these commands with. They worked great for those two projects, but your SSRS project might include some complexities that I just didn’t have in either of the projects I tested with. If you have any trouble making this work, please give me a shout or file a bug on the GitHub project and I will try to help out.

Big thanks to Doug Finke ( t ) for his code contributions, and Mike Lawell ( t ) for his help testing, to make these two commands reality.

The post Deploy SSRS Projects with Two New PowerShell Commands first appeared on SQLvariations: SQL Server, little PowerShell, maybe some Power BI.

The post Deploy SSRS Projects with Two New PowerShell Commands appeared first on SQLServerCentral.

Share
Published by

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago