Giter VIP home page Giter VIP logo

reportingservicestools's Introduction

Build status ReportingServicesTools

Reporting Services PowerShell

SQL Server Reporting Services PowerShell utilities

Synopsis

This project contains PowerShell scripts that allow you to perform various operations with SQL Server Reporting Services and Power BI Report Server. In order to use the scripts included in this project successfully, please download/clone the entire project as there are dependencies between the scripts.

All of our scripts were written with the assumption that you will be executing them against SQL Server 2016 Reporting Services default instance (i.e. mssqlserver). However, we understand this may not be the case for you. So for each script, you will see that we have provided a way for you to specify the name and/or version of your SQL Server Reporting Services or Power BI Report Server instance name. Sometimes the version of your SQL Server instance is also required. If you do not provide one, we will assume that you want to execute this against the default instance.

PowerShell Version

Please ensure you're running PowerShell version 3.0+

$PSVersionTable

Install

Invoke-Expression (Invoke-WebRequest https://raw.githubusercontent.com/Microsoft/ReportingServicesTools/master/Install.ps1)

or

Invoke-Expression (Invoke-WebRequest https://aka.ms/rstools)

or

Install-Module -Name ReportingServicesTools

Note: Using Install-Module is the preferred installation method for most users.

List of commands

The following is a list of commands which are available for you to use once you follow the steps in the Installation

Command Description
Backup-RsEncryptionKey This command backs up the encryption key used by SQL Server Reporting Services to protect sensitive content.
Connect-RsReportServer This command connects to Reporting Services and sets default connection information.
Copy-RsSubscription This command adds a retrieved subscription to an existing report. For use with Get-RsSubscription.
Export-RsSubscriptionXml This command exports a collection of subscriptions to an XML file on disk.
Get-RsFolderContent This command lists all catalog items under a folder.
Get-RsDataSource This command lists information about the data source located at the specified path.
Get-RsDeploymentConfig This command retrieves a list of deployment configurations from a Reporting Services project file.
Get-RsItemReference This command gets the item references of a report or a dataset.
Get-RsItemDataSource This command fetches embedded data sources associated with a report.
Get-RsCatalogItemRole This command retrieves access to catalog items for users or groups.
Get-RsRestCacheRefreshPlan This function fetches a CacheRefreshPlan from a Power BI report.
Get-RsRestCacheRefreshPlanHistory This function fetches the history of CacheRefreshPlan(s) from a Power BI report.
Get-RsRestDataSource This function fetches the a datasource item from a folder.
Get-RsRestFolderContent This function fetches data sources related to a catalog item from the Report Server.
Get-RsRestItem This function fetches a catalog item from the Report Server using the REST API.
Get-RsRestItemAccessPolicy This function retrieves access policies to SQL Server Reporting Services Instance or Power BI Report Server Instance from users/groups.
Get-RsRestItemDataModelParameters This function fetches the Data Model Parameters related to a Catalog Item report from the Report Server. This is currently only applicable to Power BI Reports and only from ReportServer October/2020 or higher.
Get-RsRestItemDataSource This command fetches embedded data sources associated with a Paginated report or a Power BI report using the REST Endpoint.
Get-RsSubscription This command retrieves information about subscriptions for a report.
Grant-RsRestItemAccessPolicy This function grants access policies on the SQL Server Reporting Services Instance or Power BI Report Server Instance to the specified user/group, using the REST Endpoint.
Grant-RsSystemRole This command grants access to SQL Server Reporting Services to users or groups. Alias: Grant-AccessToRs
Grant-RsCatalogItemRole This script grants access to catalog items to users or groups. Alias: Grant-AccessOnCatalogItem
Import-RsSubscriptionXml This command imports a collection of subscriptions from an XML file on disk, typically created via Export-RsSubscriptionXml.
Initialize-Rs This command initializes Report Server post-installation. The database MUST be configured and URLs MUST be reserved prior to running this command.
New-RsConfigurationSettingObject This command creates a new RSConfigurationSettingObject which is used to interact with the WMI Provider.
New-RsDataSource This command creates/overwrites the data source to the specified path.
New-RsFolder This command creates a new folder in the specified path.
New-RsRestCacheRefreshPlan This function creates a new CacheRefreshPlan for the specified Power BI Report.
New-RsRestCredentialsByUserObject This command creates a CredentialsByUser object to be used by Set-RsRestItemDataSource command.
New-RsRestCredentialsInServerObject This command creates a CredentialsInServer object to be used by Set-RsRestItemDataSource command.
New-RsRestFolder This command creates a new folder in the specified path using the REST Endpoint.
New-RsRestSession This command creates a session object to be specified for all subsequent calls to the REST Endpoint.
New-RsSubscription This command adds a new subscription to an existing report.
New-RsScheduleXml This command creates an XML string definition of a subscription schedule. For use with the -Schedule parameter or New-RsSubscription.
New-RsWebServiceProxy This command creates a new Web Service Proxy which is used to interact with the SOAP Endpoint.
Out-RsCatalogItem This command downloads a catalog item.
Out-RsFolderContent This command downloads all catalog items in a folder.
Out-RsRestFolderContent This command downloads all catalog items under a folder using the REST Endpoint.
Out-RsRestCatalogItem This command downloads a catalog item using the REST Endpoint.
Publish-RsProject This command deploys a Reporting Services project to a Power BI Report Server.
Register-PowerBI This command registers Power BI information with SQL Server Reporting Services. Alias: Register-RSPowerBI
Remove-RsCatalogItem This command removes the catalog item located at the specified path.
Remove-RsRestCatalogItem This command removes catalog item located at the specified path using the REST Endpoint.
Remove-RsRestFolder This command removes folder located at the specified path using the REST Endpoint.
Remove-RSSubscription This command removes a subscription associated with a report.
Restore-RsEncryptionKey This command restores the encryption key to the SQL Server Reporting Services.
Revoke-RsCatalogItemAccess This command revokes access to a catalog item from users or groups. Alias: Revoke-AccessOnCatalogItem
Revoke-RsRestItemAccessPolicy This function revokes access to catalog items from users/groups, using the REST Endpoint.
Revoke-RsSystemAccess This command revokes access on SQL Server Reporting Services from users or groups. Alias: Revoke-AccessToRs
Set-RsDatabase This command configures the database used by SQL Server Reporting Services.
Set-RsDatabaseCredentials This command configures the credentials to use when connecting to the database used by SQL Server Reporting Services.
Set-RsDataSet This command links a report to a dataset. Alias: Set-RsDataSetReference
Set-RsDataSource This command updates information associated to a data source. Alias: Set-RsDataSourceReference
Set-RsDataSourcePassword This command sets the password associated with a data source.
Set-RsEmailSettings This command configures the SQL Server Reporting Services email settings to use basic authentication. Alias: Set-RsEmailSettingsAsBasicAuth, Set-RsEmailSettingsAsNoAuth, Set-RsEmailSettingsAsNTLMAuth
Set-RsItemDataSource This command updates embedded data sources associated with a report.
Set-RsDataSourceReference This command overrides the reference of a report or dataset to a shared data source.
Set-RsRestItemDataModelParameters This function updates data sources related to a catalog item from the Report Server.
Set-RsRestItemDataSource This command updates embedded data sources associated with a Paginated report or a Power BI Report using the REST endpoint.
Set-RsSharedDataSource This command links a report or a dataset to a data source.
Set-RsUrlReservation This command configures the SQL Server Reporting Services URLs.
Set-PbiRsUrlReservation This command configures the Power BI Report Server URLs.
Set-RsSubscription This command updates existing subscriptions piped from Get-RsSubscription.
Start-RsRestCacheRefreshPlan This function fetches the CacheRefreshPlan of a report from the Report Server and refreshes them using the REST API. Alternatively, when a report has multiple CacheRefreshPlans you can specify which CacheRefreshPlan to refresh by passing the Id of the CacheRefreshPlan to the -Id parameter.
Test-RsRestItemDataSource This function fetches the DataSources from a Paginated or Power BI report and tests them to see if the connection can be made.
Write-RsCatalogItem This command uploads a report, a dataset, or a data source using the SOAP Endpoint.
Write-RsFolderContent This uploads all reports, datasets, and data sources in a folder.
Write-RsRestCatalogItem This command uploads a report, a dataset, or a mobile report using the REST Endpoint.
Write-RsRestFolderContent This uploads all reports, datasets, data sources, mobile reports, and Power BI reports in a folder using the REST Endpoint.

SQL Server Versions

Some of the commands listed above allow you to optionally specify the version of your SQL Server Reporting Services instance. The following is a list of versions associated with each SQL Server Reporting Services release.

SQL Server Release Version
SQL Server 2012 11
SQL Server 2014 12
SQL Server 2016 13
SQL Server 2017 14
SQL Server 2019 15

Motivation

The motivation behind this project was to help users perform SQL Server Reporting Services operations via the command line.

API Reference

All of the APIs used by this project are publicly available. There are 2 types of APIs used in this repository: SOAP and WMI. You can find more details about the SOAP API at https://msdn.microsoft.com/en-us/library/ms154052.aspx and the WMI API at https://msdn.microsoft.com/en-us/library/ms152836.aspx. In general, you will use SOAP API for operations you would perform using Report Server and Web Portal whereas you will use WMI API for operations you would perform using Reporting Services Configuration Manager.

Local testing and development

To verify the versions installed

Get-Module -ListAvailable -Name ReportingServicesTools

After you clone the repo you can make local changes and install them in your local machine with

Remove-Module ReportingServicesTools
Import-Module .\ReportingServicesTools.psd1

For debugging you can set the verbose logging with $VerbosePreference = "continue"

Test

For running tests locally you need a local default instance of SQL Server Reporting Services and Pester

To install Pester execute

Install-Module -Name Pester -RequiredVersion 4.10.1

To execute the tests run (this will execute the CatalogItems test only which doesn't change the local Reporting Services Installation)

.\Test.ps1

Import Known Issue

Workaround for newer versions of PowerShell (version 7.0+)

Import-Module ReportingServicesTools -UseWindowsPowerShell

Style Guidelines

If you have any scripts you would like to share, we request you to please format your scripts according to the guidelines created by the team behind the DSC Resource Kit. (https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md) and the PowerShell verbs (https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands)

Contributions

For contributions please provide the minimum possible increment per Pull Request so it can be reviewed and merged quickly.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

reportingservicestools's People

Contributors

claudioessilva avatar danubie avatar deitch avatar ermart avatar gboreki avatar gborekims avatar getalex avatar jbelina avatar jeremymcgee73 avatar jtarquino avatar jzabroski avatar lishibo avatar markwragg avatar nschonni avatar parthsha avatar periscope-nz avatar potatoqualitee avatar rgernha avatar robertoandrade avatar sdubrick avatar sebixpad24 avatar slyfoxhayes avatar sqlchicken avatar sqlvariant avatar superjc710e avatar suyogkw avatar vytux-com avatar warren2600 avatar wrthmn avatar zkw-alban avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reportingservicestools's Issues

Create Octopus Deploy Library step template for deploying SSRS using ReportingServicesTools

This is a great project, and is much better than anything else I have found out there. There is a good chance I will do this project/issue/request myself in the coming months, if interested.

Do you want to request a feature or report a bug?
I want a feature

What is the current behavior?
Most tools like this one are challenging to figure out how to configure, and everyone tries to come up with their own approach, usually working around various SSRS project limitations.

What is the expected behavior?
Deploy reports via ReportingServicesTools through Octopus Deploy via configuring a Step Template. Final output should publish the step template to https://library.octopus.com/

There already exists one such template, but it would be nice if Microsoft's PowerShell toolchain for SSRS was the back-end for such template. See the current one here: https://github.com/OctopusDeploy/Library/blob/master/step-templates/ssrs-deploy-from-package.json and here: https://library.octopus.com/step-templates/4e3a1163-e157-4675-a60c-4dc569d14348/actiontemplate-deploy-ssrs-reports-from-a-package

Write-RsCatalogItem does not check return value of $Proxy.CreateCatalogItem

Do you want to request a feature or report a bug?
bug

What is the current behavior?
If the .rdl file being written to the report server's catalog has an invalid data source (e.g. one that has not yet been uploaded), then the report server will not create a CatalogItem but will populate the Warnings [out] collection as vaguely documented here: https://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010.createcatalogitem.aspx The docs say "If errors occur, the item is not created." The C# code example is equally vague, as it does not check the returned CatalogItem object's value, but the cod example does suggest catching SoapException.

In ReportingServicesTools Write-RsCatalogItem, currently, CreateCatalogItem result is piped to Out-Null and not checked for a non-null reference.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Edit an RDL file to point to a bogus DataSourceReference (or one that does not exist yet), and call Write-RsCatalogItem on the RDL file.

What is the expected behavior?
Some way to alert the client programmer that the report did not get uploaded successfully.

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

PS C:\> $PSVersionTable

Name                           Value                                                                                                                                                                                                 
----                           -----                                                                                                                                                                                                 
PSVersion                      5.1.15063.483                                                                                                                                                                                         
PSEdition                      Desktop                                                                                                                                                                                               
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                               
BuildVersion                   10.0.15063.483                                                                                                                                                                                        
CLRVersion                     4.0.30319.42000                                                                                                                                                                                       
WSManStackVersion              3.0                                                                                                                                                                                                   
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                   
SerializationVersion           1.1.0.1                                                                                                                                                                                               

Bug with Set-RsDataSourcePassword

THis is all performed on a local PC using an admin account.

The specific error message appears to be: The combination of values for the fields Password and CredentialRetrieval are not valid.

If I am making a mistake here, please enlighten me. I get the same error when I do put in the credential
set-rsdatasourcepassword_stillnotworking

My command -

Set-RsDataSourcePassword -ReportServerUri 'http://vanl-jjf4362/reportserver' -Path /BOB/BOBDS -verbose -debug

Thank you.

Initialize-Rs - unsure about syntax

The help file does not have any examples, but I looked at the function code and figured out the parameters.

Here is what I put in:

Initialize-Rs -ReportServerInstance 'MSSQLSERVER' -ReportServerVersion '12' -ComputerName 'vanl-jjf4362'

I received this error:

Get-WmiObject : The RPC server is unavailable.

I may very well be doing something wrong, but I am just not sure.

Thanks!

Write-RsCatalogItem.ps1 suppresses $warnings, even in -Verbose mode

$warnings is assigned via a [ref] but is not output, even in -Verbose mode.

As I explain in my pull request, this appears to be a much bigger problem than I first thought, as apparently the 2016 Reporting Services endpoint I am testing against silently fails to actually create the report.

Allow setting of properties on report (Hide in Tile View)

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
Property setting is available for DataSources, but not others. This may be the last bit of custom functionality we have in our own SSRS library that I haven't seen in here. Could probably PR something if there is intereset

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?
Ability to set the RDL properties like https://stackoverflow.com/a/32565307/455535

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
PS 3+, new feature

Bug with Set-RsSubscription

Do you want to request a feature or report a bug?
Bug

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
When copying subscriptions using Get-RsSubscription and Set-RsSubscription powershell scripts, there is a type mismatch for ExtensionSettings object. Screenshot attached.
subscription copy

What is the expected behavior?

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

Write-RsCatalogItem & Write-RsFolderContent don't support uploading a Shared DataSource file (.rds)

Write-RsCatalogItem & Write-RsFolderContent don't support uploading a Shared DataSource file (.rds)

When you try to run a command like the following, your receive an error message:
Write-RsCatalogItem -ReportServerUri http://localhost/ReportServer_SQL2016 -Path 'C:\SSIS Reporting Pack\Reports\SSISCatalog.rds' -Destination /SSISReportingPack -Verbose

Currently only .rdl, .rsds and .rsd files are supported
At C:\Users\sql2k\Documents\WindowsPowerShell\Modules\ReportingServicesTools\Functi
ons\Common\Get-ItemType.ps1:12 char:18

When will Write-RsCatalogItem & Write-RsFolderContent support extremely common scenarios like uploading a Shared DataSource file (.rds)?

Set-RsDatabase wmi error on SSRS 2017

Seems to be a but when trying to use this with SSRS 2017
I run the command:
Set-RsDatabase -DatabaseServerName myserver\myinstance -Name reportingdb_new -DatabaseCredentialType Windows

And I'm presented with a WMI error.

Get-WmiObject : Invalid namespace "root\Microsoft\SqlServer\ReportServer\RS_MSSQLSERVER\v13\Admin"
At C:\Program Files\WindowsPowerShell\Modules\ReportingServicesTools\0.0.3.1\Functions\Utilities\New-RsConfigurationSet
tingObject.ps1:100 char:19

  • $wmiObjects = Get-WmiObject @getWmiObjectParameters
    
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
    • FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

In my setup I'm trying the SSRS 2017 on a clean server with SQL Server running on another clean server remotely the SQL Engine is 2016 Sp1 in case it matters.

I admit I could be running this module out of context.

Set-RsUrlReservation rerun

feature

What is the current behavior?
setting up the URL can be done only once, if a mistake is made can no longer use Set-RsUrlReservation to change the values.
Example Set-RsUrlReservation -ReportServerVirtualDirectory ReportServer -PortalVirtualDirectory Reports -ReportServerInstance SSRS -ReportServerVersion SQLServer2017 -ListeningPort 80
works perfectly if run second time with any options ports or directly changes or even just the same settings I am presented with:

Failed to reserve Urls Failed Setting Virtual Directory for ReportServerWebService, Errocode: -2147220930
At C:\Program
Files\WindowsPowerShell\Modules\ReportingServicesTools\0.0.3.1\Functions\Admin\Set-RsUrlReservation.ps1:134 char:9

  •     throw (New-Object System.Exception("Failed to reserve Urls $( ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (:) [], Exception
    • FullyQualifiedErrorId : Failed to reserve Urls Failed Setting Virtual Directory for ReportServerWebService, Erro
      code: -2147220930

I believe this is because there is no .RemoveURL remove used within the script only .ReserveURL and .SetVirtualDirectory

[Feature] Read Error Log files

This is new feature request.

I need to read error log for current reporting services on disk. I am not a powershell expert. what do you think about it ? i uploaded which i using script right now.

I am combining all errorlog and inserting datawarehouse db. After that analysis services powerbi etc. visualizing jobs. i think it would be a great feature.

Question

Given this supports all native installations. Is the intent for this module to allow for sharepoint integrated as well?

Error in Backup-RsEncryptionKey

I get an error using Backup-RsEncryptionKey

Erreur: Espace de noms non valide ยซย root\Microsoft\SqlServer\ReportServer\RS_PBIRS\v13\Adminย ยป
Dans le fichier C:\Users\I212027_SVA\Desktop\ReportingServicesTools\Functions\Utilities\New-RsConfigurationSettingObject.ps1 (ligne 100)
    $wmiObjects = Get-WmiObject @getWmiObjectParameters

Which can be translated as "invalid namespace"

I ran that command

Backup-RsEncryptionKey -Password $password -KeyPath "f:\temp\Clรฉ-Chiffrement$env:computername.snk" -ReportServerInstance $global:PBIRSInstanceName
PBIRSINstanceName => "PBIRS"

Did I miss something ?

Powershell version 4 / Windows Server 2012 R2 Standard French
Power BI Report Server - June GA

Cannot migrate mobileReports

Do you want to request a feature or report a bug?
It is a bug

What is the current behavior?
I copy the entire site from one server to a newer one and it copies mobile reports as folder and subfolders

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
I have two servers with SqlServer 2016. In the source server I execute
Out-RsFolderContent -ReportServerUri 'http://a04e0102/ReportServer_SQLSERVER2016' -Destination C:\tmp\company\paso -RsFolder /paso -Recurse

and in the target server I execute
Write-RsFolderContent -Recurse -Path C:\intercambio\company\paso -RsFolder /paso -ReportServerUri 'http://a04s0014/ReportServer'

What I get in the target server is a folder with the name of the mobile report and one subfolder named contents

SELECT * FROM [ReportServer].[dbo].[Catalog]

/paso
/paso/Grafico30-30-Clientes
/paso/Grafico30-30-Clientes/contents

What is the expected behavior?
I sould get a mobile report preview

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
I tried with ReportingServicesTools 0.0.0.9 and 0.0.0.15 and no one works
The source server is a Windows 10 PC with PowerShell 5.1.14393.1066
The target server is a Windows Server 2016 PC with PowerShell 5.1.14393.953

** TIPS
The first error I've got occurs when I try to export the folder in the source server:

`PS C:\WINDOWS\system32> Out-RsFolderContent -ReportServerUri 'http://a04e0102/ReportServer_SQLSERVER2016' -Destination C:\tmp\paso -RsFolder /paso -Recurse
Out-RsCatalogItem : No se puede validar el argumento del parรกmetro 'Destination'. El script de validaciรณn " Test-Path $_ -PathType Container" para el argumento con valor
"C:\tmp\paso\Grafico30-30-Clientes\contents" no devolviรณ el resultado True. Determine por quรฉ hubo un error en el script de validaciรณn e intente ejecutar el comando de nuevo.
En C:\Users\julio.local\Documents\WindowsPowerShell\Modules\ReportingServicesTools\Functions\CatalogItems\Out-RsFolderContent.ps1: 122 Carรกcter: 79

  • ... RsCatalogItem -proxy $proxy -RsFolder $item.Path -Destination $folder
  •                                                               ~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Out-RsCatalogItem], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Out-RsCatalogItem`

dir_tmp_paso

The second time I execute the same command I get no error, but I get a new file UniversalBrand.colors

dir_tmp_paso2

SSL Support

feature

Add SSL configuration support to Set-RsUrlReservation, Set-PbiRsUrlReservation

Currently I couldn't find an option to add SSL at the same time as configuration the virtual directory.
Adding this option under another function would work as well, but SSL support would be a very nice enhancement.

Add error handling to New-RsSubscription for RenderFormat="EXCEL"

Feature

Consider adding a -ForceUpgrade flag on New-RsSubscription and Set-RsSubscription.

Alternatively, Allow New-RsSubscription to support "EXCEL" but only for a unique 2008 Parameter set.

Background

In SSRS 2012, support was dropped for "EXCEL" RenderFormat. Therefore, if you Get-RsSubscription in 2008 and Set-RsSubscription in a 2012 or later server for migrating your databases, it will fail because it does not recognize "EXCEL" but "EXCELOPENXML" works.

https://docs.microsoft.com/en-us/sql/reporting-services/report-builder/exporting-to-microsoft-excel-report-builder-and-ssrs

Get-RsCatalogItems returns too much information to the screen

I would like to request a feature be added to Get-RsCatalogItems to limit the number of properties returned to the screen by default, and that they be returned in Format-Table style.

Currently, when calling Get-RsCatalogItems it returns all properties of the objects, and they are output in Format-List style.

Data Professionals are used to seeing data returned in the format of a table. If you run Get-SqlDatabase -ServerInstance localhost;
it give you output that is very similar to the default output in Object Explorer Details in SSMS. However if you were to do Get-SqlDatabase -ServerInstance localhost | SELECT *; you would end up seeing all of the properties, not just the limited set.

I would like to see the output of Get-RsCatalogItems reduced to this by default:

Get-RsCatalogItems -ReportServerUri 'http://localhost/ReportServer' -Path '/SQL Server Performance Dashboard' |
SELECT Name, TypeName, Size, CreationDate, ModifiedDate |
Format-Table -AutoSize

Piping between Get-RsFolderContent and Remove-RsCatalogItem doesnยดt work as expected

Do you want to request a feature or report a bug?
I want to report a bug

What is the current behavior?
An example from the documentation isnยดt working

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Get-Help Remove-RsCatalogItem -example

-------------------------- EXAMPLE 2 --------------------------

PS C:\>Get-RsCatalogItems -ReportServerUri http://localhost/ReportServer_SQL2016 -RsFolder '/SQL Server Performance Dashboard' |

Out-GridView -PassThru |
Remove-RsCatalogItem -ReportServerUri http://localhost/ReportServer_SQL2016

Description
-----------
Gets a list of items from the SQL Server Performance Dashboard folder in a GridView from an SSRS instance names SQL2016 and allows the user to select items to be removed, after clicking "OK", only
the items selected will be removed.

Exception occurred while deleting catalog item 'Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1tserver_ReportService2010_asmx.CatalogItem'! Exception
calling "DeleteItem" with "1" argument(s): "System.Web.Services.Protocols.SoapException: The path of the item
'Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1tserver_ReportService2010_asmx.CatalogItem' is not valid. The full path must be less than 260 characters
long; other restrictions apply. If the report server is in native mode, the path must start with slash. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidItemPathException: The
path of the item 'Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1tserver_ReportService2010_asmx.CatalogItem' is not valid. The full path must be less than
260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash.
at Microsoft.ReportingServices.Library.ReportingService2005Impl.DeleteItem(String Item, Guid batchId)
at Microsoft.ReportingServices.Library.ReportingService2005Impl.DeleteItem(String Item)
at Microsoft.ReportingServices.WebServer.ReportingService2010.DeleteItem(String ItemPath)"
At C:\kitsune\ReportingServicesTools\Functions\CatalogItems\Remove-RsCatalogItem.ps1:82 char:21

What is the expected behavior?

Delete the catalog items. For example this one works:
(Get-RsFolderContent -RsFolder / ).path | Remove-RsCatalogItem -ReportServerUri http://localhost/reportserver

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

Attempting to copy reports and datasources from local files to reports server fails on data source.

I have a folder with two reports and a shared data source in it's own subfolder. I have exported the files to local disk using Out-RsFolderContent. When using Write-RsFolderContent to copy the files to another report server, the following error occurs:

Exception calling "CreateCatalogItem" with "7" argument(s): "The value of parameter 'Definition' is not valid. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidParameterException: The value of parameter 'Definition' is not
valid. ---> System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 2, position 1."
At C:...\ReportingServicesTools\Functions\CatalogItems\Write-RsCatalogItem.ps1:108 char:5

  • $Proxy.CreateCatalogItem($itemType, $itemName, $Destination, $ove ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : SoapException

SSRS 2012
Windows 7
PS Version 5.0.10586.117

Thanks!!!

Write-RsCatalogItem Cannot use UNC Paths

Do you want to request a feature or report a bug?
bug
What is the current behavior?
Specifying a UNC path "\\server\share\myreport.rdl" for the -Path parameter results in error. I think this is due to the "Resolve-Path $item" in the code pre-pending "Microsoft.PowerShell.Core\FileSystem::" to the value. See verbose output below. Could wrapping the call with "Convert-Path (Resolve-Path $item)" fix the issue?

PS C:\Temp> Write-RsCatalogItem -ReportServerUri "http://someserver/ReportServer" `
    -Path "\\server\share\MyReport.rdl" `
    -Destination "/MyFolder"  -Override  -Verbose
VERBOSE: Uploading Microsoft.PowerShell.Core\FileSystem::\\server\share\MyReport.rdl to /MyFolder/MyReport
Exception calling "ReadAllBytes" with "1" argument(s): "The given path's format is not supported."
At C:\Program Files\WindowsPowerShell\Modules\ReportingServicesTools\0.0.0.15\Functions\CatalogItems\Write-RsCatalogItem.ps1:159 char:17
+                 $bytes = [System.IO.File]::ReadAllBytes($EntirePath)
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : NotSupportedException
 
Exception calling "CreateCatalogItem" with "7" argument(s): "The value for parameter 'Definition' is not specified. It is either missing from the function call, or it is set to null. ---> 
Microsoft.ReportingServices.Diagnostics.Utilities.MissingParameterException: The value for parameter 'Definition' is not specified. It is either missing from the function call, or it is set to null."
At C:\Program Files\WindowsPowerShell\Modules\ReportingServicesTools\0.0.0.15\Functions\CatalogItems\Write-RsCatalogItem.ps1:161 char:17
+ ...             $Proxy.CreateCatalogItem($itemType, $itemName, $RsFolder, ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : SoapException

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Write-RsCatalogItem -ReportServerUri "http://someserver/ReportServer" -Path "\\server\share\myreport.rdl" -Destination "/Folder" -Override
What is the expected behavior?
Read file from UNC share.
Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
I'm using 5 on Windows 10. Don't know if it worked in previous versions.

Thank You!

Installation via Install.ps1 is not working

I would like to report a bug suspect.

The installation via Install.ps1 is currently not working as it fails to locate src\ReportingServicesTools.psd1 on line 100. The actual filepath should probably be ReportingServicesTools\ReportingServicesTools.psd1

It can be reproduced on clean environment.
The installation does not finish, reporting

PS C:\Users\administrator> #Install RStools
Invoke-Expression (Invoke-WebRequest https://aka.ms/rstools)

Install-Module -Name ReportingServicesTools
Installing module to C:\Users\administrator\Documents\WindowsPowerShell\Modules\ReportingServicesTools
Deleting previously installed module
Downloading archive from github
Unzipping
Cleaning up
Done!
Import-Module : The specified module 
'C:\Users\administrator\Documents\WindowsPowerShell\Modules\ReportingServicesTools\src\ReportingServicesTools.psd1' was not 
loaded because no valid module file was found in any module directory.
At line:100 char:66
+ ... nt -eq 0) { Import-Module "$path\src\ReportingServicesTools.psd1" -Fo ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (C:\Users\admini...vicesTools.psd1:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
 


If you experience any function missing errors after update, please restart PowerShell or reload your profile.

Wrap ReportingServicesTools' objects as a Powershell SHiPSDirectory

Do you want to request a feature or report a bug?
feature

What is the current behavior?
ReportingServicesTools works great. I would rather browse RS catalog folders and items via PowerShell than via a Web UI, as while the new Web UI looks much nicer than the old Web UI, it requires SO MANY clicks to get anything useful done compared to SSRS 2008's ugly but efficient UI.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?
Provide a PowerShell snap-in so that reporting services can be mounted as a PSDrive via a ReportingServicesToolsProvider snap-in. This could have useful shortcuts, such as automatically opening the default web browser up to to the PSDrive's current location.

Here is some v1.0 features:

  • list items on a report server Get-ChildItems
  • navigate the report server structure Set-Location rs:\Resources\ and cd Logos - Get-Location will return rs:\Resources\Logos\
  • create/delete reports
  • create/delete folders New-Item rs:\DataSources\ and Remove-Item rs:\DataSources\
  • create/delete data sources Get-ChildItem rs:\ | Where-Object { $_.Type -eq "DataSource" } | ForEach-Object { Remove-Item $_.Path }
  • create/delete resources
  • open default web browser to current PSDrive location when the current PSDrive is a ReportingServicesToolsProvider snap-in. e.g. http://localhost/Reports/browse/ but eventually would be nice to also open http://localhost/Reports/manage/catalogitem/security/ - One can imagine how nice it would be to quickly pull up subscription pages, set the subscriptions, then go back to the command line and do Export-RsSubscriptionXml

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
n/a - feature request

Publish to PowerShell Gallery

Hey guys,

I can see that the repo is fairly new which is probably the reason for the current installation procedure. Are you planning to integrate appveyor to publish it to the PS Gallery like PowerShell community resources, official Microsoft PowerShell and DSC modules do?

Thanks in advance,
Seb

Can't add more than one Role for same user using Grant-RsCatalogItemRole

Do you want to request a feature or report a bug?
bug

What is the current behavior?
It gives an error when we try to add a 2nd role to an existing user.

Error occurred while granting Content Manager to User on /Folder! Exception calling "SetPolicies" with "2" argument(s): "System.Web.Services.Protocols.SoapException: The policy for
'User' user or group is not valid. The role assignment is either empty, specifies a user or group name that is already used in an existing role assignment for the current item, or specifies duplicate roles for the same user or group. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InvalidPolicyDefinitionException: The policy for 'User' user or group is not valid. The role assignment is either empty, specifies a user or group name that is already used in an existing role assignment for the current item, or specifies duplicate roles for the same user or group.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Create new folder
New-RsFolder -ReportServerUri $reportServerUri -RsFolder "/" -FolderName "Folder"

Grant permissions - Works correctly
Grant-RsCatalogItemRole -ReportServerUri $reportServerUri -Path "/Folder" -RoleName 'Browser' -Identity "User"

When try to run the following - will fail
Grant-RsCatalogItemRole -ReportServerUri $reportServerUri -Path "/Folder" -RoleName 'Browser' -Identity "User"

What is the expected behavior?
That the new Role is appended to the existing ones.

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
PowerShell v5.0
Windows 10

Not that I'm aware of.

Notes
I have and will submit a fix.

New-RsScheduleXml requires -Months parameter; convert array to enum to allow nulls

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
In 0.0.2.9, I get this error:

Cannot validate argument on parameter 'Months'. The argument is null, empty, or an element of the argument collection contains a null value. Supply a collection that does not contain any null values and then try the command again.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?
This appears to be a known limitation of PowerShell ValidateSet behavior. See: https://stackoverflow.com/a/29656594/1040437

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

PS C:\source\> $PSVersionTable

Name                           Value                                                                                                                                                                                                                             
----                           -----                                                                                                                                                                                                                             
PSVersion                      5.1.15063.483                                                                                                                                                                                                                     
PSEdition                      Desktop                                                                                                                                                                                                                           
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                                                           
BuildVersion                   10.0.15063.483                                                                                                                                                                                                                    
CLRVersion                     4.0.30319.42000                                                                                                                                                                                                                   
WSManStackVersion              3.0                                                                                                                                                                                                                               
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                                               
SerializationVersion           1.1.0.1                 

New-RsDataSource does not check return value of CreateDataSource

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Silently fails to create a data source if the -RsFolder does not exist.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Please see https://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010.createdatasource.aspx
If errors occur, the data source is not created.

Passing in an invalid -RsFolder causes the problem.

What is the expected behavior?
Raise an error.

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

PS C:\> $PSVersionTable

Name                           Value                                                                                                                                                                                                 
----                           -----                                                                                                                                                                                                 
PSVersion                      5.1.15063.483                                                                                                                                                                                         
PSEdition                      Desktop                                                                                                                                                                                               
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                               
BuildVersion                   10.0.15063.483                                                                                                                                                                                        
CLRVersion                     4.0.30319.42000                                                                                                                                                                                       
WSManStackVersion              3.0                                                                                                                                                                                                   
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                   
SerializationVersion           1.1.0.1             

-Verbose spuriously prints target as "http://localhost/reportserver" regardless of $Proxy being set

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
-Verbose switch does not log Uri correctly

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Repro scenario 1:

Import-Module ReportingServicesTools;

$_proxy = New-RsWebServiceProxy -ReportServerUri "http://myreportingbox/ReportServer_ALPHA/" -Verbose;

$existingRoles = Get-RsCatalogItemRole -Proxy $_proxy -Path '/' | Where-Object { $_.Identity -ne "BUILTIN\Administrators" }

foreach ($_ in $existingRoles)
{
    $identity = $_.Identity;
    Write-Output "Revoke-RsCatalogItemAccess for $identity to '/'" | Out-Host;
    Revoke-RsCatalogItemAccess -Proxy $_proxy -Identity $_.Identity -Path '/' -Verbose # | Out-Host;
}
Write-Output "Granting rs catalog item role Browser:" | Out-Host;
Grant-RsCatalogItemRole -Proxy $_proxy -Identity 'MYDOMAIN\Developers' -RoleName 'Browser' -Path '/' -Verbose 

$_proxy.Dispose();

Repro scenario 2:

Import-Module ReportingServicesTools

New-RsWebServiceProxy -ReportServerUri "http://myreportingbox/ReportServer_ALPHA/" -Verbose;

$existingRoles = Get-RsCatalogItemRole  -Path '/' | Where-Object { $_.Identity -ne "BUILTIN\Administrators" }

foreach ($_ in $existingRoles)
{
    $identity = $_.Identity;
    Write-Output "Revoke-RsCatalogItemAccess for $identity to '/'" | Out-Host;
    Revoke-RsCatalogItemAccess -Identity $_.Identity -Path '/' -Verbose # | Out-Host;
}
Write-Output "Granting rs catalog item role Browser:" | Out-Host;
Grant-RsCatalogItemRole -Identity 'MYDOMAIN\Developers' -RoleName 'Browser' -Path '/' -Verbose #| Out-Host;

What is the expected behavior?
Log the -ReportServerUri value passed to New-RsWebServiceProxy

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

PS C:\WINDOWS\system32> $PSVersionTable

Name                           Value                                                                                                                                                                                                 
----                           -----                                                                                                                                                                                                 
PSVersion                      5.1.15063.483                                                                                                                                                                                         
PSEdition                      Desktop                                                                                                                                                                                               
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                               
BuildVersion                   10.0.15063.483                                                                                                                                                                                        
CLRVersion                     4.0.30319.42000                                                                                                                                                                                       
WSManStackVersion              3.0                                                                                                                                                                                                   
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                   
SerializationVersion           1.1.0.1                                                                                                                                                                                               

Out-RsCatalogItem not generating correct XML for data sources

When using Out-RsCatalogItem to export a data source, the API is not returning expected/correct XML definition. You cannot deploy an exported dataset back to Reporting Services without the proper formatting. Reporting Services does not see it as a valid data source.

Below are comparisons of RDS definitions:

Exported RDS via SSRS API (GetItemDefinition):

<DataSourceDefinition>
	<Extension>SQL</Extension>
	<ConnectString>Data Source=(local);Initial Catalog=AdventureWorks2014</ConnectString>
	<UseOriginalConnectString>False</UseOriginalConnectString>
	<OriginalConnectStringExpressionBased>False</OriginalConnectStringExpressionBased>
	<CredentialRetrieval>Store</CredentialRetrieval>
	<WindowsCredentials>True</WindowsCredentials>
	<ImpersonateUser>False</ImpersonateUser>
	<UserName>domain\user</UserName>
	<Enabled>True</Enabled>
</DataSourceDefinition>

Definition of shared data source as created in Visual Studio:

<?xml version="1.0" encoding="utf-8"?>
<RptDataSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="dsrcAW2016">
	<ConnectionProperties>
		<Extension>SQL</Extension>
		<ConnectString>Data Source=(local)\elektra;Initial Catalog=AdventureworksDW2016CTP3</ConnectString>
		<IntegratedSecurity>true</IntegratedSecurity>
	</ConnectionProperties>
	<DataSourceID>dc94beb9-b13c-4219-ae9e-ea5033017691</DataSourceID>
</RptDataSource>

Write-Information (v5) is used but only v3 is required

Do you want to request a feature or report a bug?

bug

What is the current behavior?

Write-Information is used. Write-Information was introduced by PowerShell v5 but the psd1 only requires v3.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Install Win2012, don't update WMF to 5.0, type Write-Information from the command line

What is the expected behavior?

Either require v5 or update the code to be v3 compatible (preferred)

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

v3 on Server 2012

Issue in Creating Subscriptions using PowerShell

I want to report the bug

Hi - I am trying to create the subscriptions using Powershell command. I want to read the source report subscription and create it on destination report. Both Soure/Destination report servers have SSRS 2016 version but I am getting the conversion error. Please advise me how to resolve it.

I am using below command from Powershell:

PS C:\Windows\system32> Get-RsSubscription -ReportServerUri 'http://datauat/INSIGHTS_wsvc' -Path '/Mining Operations/BI Solomon Consolidated Ops Report/BI_Solomon_ConsolidatedOpsReport' | Set-RsSubscription -ReportServerUri 'http://localhost/Reportserver_SQL2016' -Path '/Mining Operations/BI Solomon Consolidated Ops Report/BI_Solomon_ConsolidatedOpsReport'

I am receiving below error. Please help me in resolving it.

Get-RsSubscription : System.Exception: Exception while retrieving subscription properties! Exception occurred while creating subscription! Cannot convert argument "ExtensionSettings", with

value: "Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings", for "CreateSubscription" to type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy9sql2016_ReportService2010_asmx.ExtensionSettings": "Cannot convert the

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings" value of type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings" to type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy9sql2016_ReportService2010_asmx.ExtensionSettings"." ---> System.Exception: Exception occurred while

creating subscription! Cannot convert argument "ExtensionSettings", with value:

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings", for "CreateSubscription" to type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy9sql2016_ReportService2010_asmx.ExtensionSettings": "Cannot convert the

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings" value of type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings" to type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy9sql2016_ReportService2010_asmx.ExtensionSettings"." ---> System.Management.Automation.MethodException:

Cannot convert argument "ExtensionSettings", with value:

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings", for "CreateSubscription" to type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy9sql2016_ReportService2010_asmx.ExtensionSettings": "Cannot convert the

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings" value of type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings" to type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy9sql2016_ReportService2010_asmx.ExtensionSettings"." --->

System.Management.Automation.PSInvalidCastException: Cannot convert the

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings" value of type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1TS_wsvc_ReportService2010_asmx.ExtensionSettings" to type

"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy9sql2016_ReportService2010_asmx.ExtensionSettings".

at System.Management.Automation.LanguagePrimitives.ThrowInvalidCastException(Object valueToConvert, Type resultType)

at System.Management.Automation.LanguagePrimitives.ConvertNoConversion(Object valueToConvert, Type resultType, Boolean recurse, PSObject originalValueToConvert, IFormatProvider

formatProvider, TypeTable backupTable)

at CallSite.Target(Closure , CallSite , Object , String , Object , Object , Object , Object , Object )

--- End of inner exception stack trace ---

at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)

at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)

at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

--- End of inner exception stack trace ---

--- End of inner exception stack trace ---

At line:1 char:1

  • Get-RsSubscription -ReportServerUri 'http://uat/INSIGHTS_wsvc' -Path '/Minin ...

  • 
      + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-RsSubscription
    
    
    

I am using Powershell version 4.0

Question about RsFolder parameters

Hi guys,

I've got a design question:
What was the reason to break with the PowerShell standard for parameters designating paths and introducing the name "RsFolder" for parameters pointing at a folder only?

Cheers,
Fred

Initialize-Rs fails on Azure SQL Server 2014 SP2 on Windows Server 2012 R2 (SQL2014SP2-WS2012R2)

Hi, I'm trying to initialize an Azure SQL instance and I'm getting the following error:

> Initialize-Rs -ReportServerVersion 12 -Debug -Verbose
VERBOSE: Initializing Report Server...
VERBOSE: Success!
Failed to Initialize Report Server, Errocode: -2146233088
At C:\Program Files\WindowsPowerShell\Modules\ReportingServicesTools\0.0.2.4\Functions\Admin\Initialize-Rs.ps1:70 char:9
+         throw "Failed to Initialize Report Server, Errocode: $($resul ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Failed to Initi...de: -2146233088:String) [], RuntimeException
    + FullyQualifiedErrorId : Failed to Initialize Report Server, Errocode: -2146233088

Database and URL endpoints have been configured correctly.
Is there a way to get some more meaningful error logs to isolate the issue?

Pester Tests

Question:

I have a bunch of code I've written for SSRS that includes a full CI that I"m presently using for Native and SSRS integrated. I'd like to share it but I'm struggling with how much I should put in my pester tests. Can you provide a link to what your expectations for a Good pester test would include? SSRS on the same host or SSRS native and integrated? What is the general expectation?

Add Update functions

Feature Request
This module is already awesome as is. It would be great if we can get a set of Update functions as well. Thoughts?

Out-RsCatalogItem Does Not Support TypeName of PowerBIReport

I am trying to automate deployment & testing of my Power BI reports in the RS Stand Alone Preview however Out-RsCatalogItem does not support TypeName of PowerBIReport.

PS C:\temp> 
Out-RsFolderContent -ReportServerUri http://localhost/RSSA -RsFolder /BasicSalesReport -Destination c:\temp\
Exception calling "ListChildren" with "2" argument(s): "System.Web.Services.Protocols.SoapException: The operation you are attempting on item 
'/BasicSalesReport' is not allowed for this item type. ---> Microsoft.ReportingServices.Diagnostics.Utilities.WrongItemTypeException: The operation 
you are attempting on item '/BasicSalesReport' is not allowed for this item type.
   at Microsoft.ReportingServices.Library.ReportingService2005Impl.ListChildren(String Item, Boolean Recursive, CatalogItemList& CatalogItems)
   at Microsoft.ReportingServices.WebServer.ReportingService2010.ListChildren(String ItemPath, Boolean Recursive, CatalogItem[]& CatalogItems)"
At C:\Users\sql2k\Documents\WindowsPowerShell\Modules\ReportingServicesTools\Functions\CatalogItems\Get-RsFolderContent.ps1:82 char:9
+         $Proxy.ListChildren($RsFolder, $Recurse)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : SoapException
 

PS C:\temp> 

I would like to be able to export this report before overwriting it with a new version.

PowerShell 5.1 using SSRS Stand Alone Preview & Power BI Desktop (SQL Server Reporting Services)

Get-RsCatalogItemRole

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Trying to run Get-RsCatalogItemRole -ReportServerUri 'http://localhost/ReportServer' -Path "/" but when I execute I keep getting New-RsCatalogItemRoleObject : Unable to find type.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Get-RsCatalogItemRole -ReportServerUri 'http://localhost/ReportServer' -Path "/"

What is the expected behavior?

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
I do not know about previous versions, running OS windows server 2012 R2 and PS 4 module version 0.0.2.4
reportingservicestools_error

Write-RsFolderContent not parsing correctly

When trying to deploy folders and content (recursively), the script is not building out the $parentFolder variable correctly. Have tested with nested folders locally and tried deploying both to root (e.g. / ) and to a direct folder (e.g. /folder).
ssrs-ps-rsupload

New-RsSubscription does not accept -Parameters argument (and sets it to null)

Do you want to request a feature or report a bug?
feature

What is the current behavior?
$Parameters is hardcoded to null and there is no API hook exposed to override this hardcoded behavior. See: https://github.com/Microsoft/ReportingServicesTools/blob/master/ReportingServicesTools/Functions/CatalogItems/New-RsSubscription.ps1#L205

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
I don't think I really need to explain this.

What is the expected behavior?
Feature parity with CreateSubscription SSRS WSDL endpoint.

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

PS C:\> $PSVersionTable

Name                           Value                                                                                                                                                                                                 
----                           -----                                                                                                                                                                                                 
PSVersion                      5.1.15063.483                                                                                                                                                                                         
PSEdition                      Desktop                                                                                                                                                                                               
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                               
BuildVersion                   10.0.15063.483                                                                                                                                                                                        
CLRVersion                     4.0.30319.42000                                                                                                                                                                                       
WSManStackVersion              3.0                                                                                                                                                                                                   
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                   
SerializationVersion           1.1.0.1                                                                                                                                                                                               

New-RsFolder Item already exists

What exception to catch when using the New-RsFolder cmdlet if the folder already exists?

Unable to find type [Microsoft.ReportingServices.Diagnostics.Utilities.ItemAlreadyExistsException]

Is there check for existence, or another cmdlet to use for existence such as Get-RsFolder ?

Receive Error Message when execute Get-RsCatalogItemRole

Hello,
I installed the latest ReportServicesTools and Execute Get-RsCatalogItemRole.
I got this error message
New-RsCatalogItemRoleObject : Unable to find type
[Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1tserver_ReportService2010_asmx.Policy].
At C:\Program Files\WindowsPowerShell\Modules\ReportingServicesTools\0.0.1.6\Functions\Security\Get-RsCatalogItemRole.ps1:104 char:29

  •     $catalogItemRoles = New-RsCatalogItemRoleObject -Policy $pare ...
    
  •                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (Microsoft.Power...010_asmx.Policy:TypeName) [], RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

Here is my command:
$ReportServerUri = 'http://localhost/reports/ReportService2010.asmx?wsdl'
Get-RsCatalogItemRole -ReportServerUri $ReportServerUri -path '/Team' -Verbose

Thanks
/Danny

Create tutorial with some best practices

Do you want to request a feature or report a bug?
feature

What is the current behavior?
The README.md file lists all the APIs, but I think there is a fairly standard way to structure things that is unexplained in the existing README, and think it would help save everyone time if that structure was canonicalized in some quality example code. Such quality example code could then feed into Issue #84 - once people can see a standard approach to setting up a reporting environment, they can also see how a fully parameterized approach can be plugged into Octopus Deploy via a step template.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?
People should be able to copy and paste code, it just works, then go drink a beer.

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
n/a - documentation/tutorial

Is there a parameter for 'Description' in the New-RsDataSource cmdlet?

Do you want to request a feature or report a bug?
feature

What is the current behavior?
No parameter for -Description in New-RsDataSource cmdlet function

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?
If connecting and viewing datasources in a browser, there is a description field.

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

Write-RsFolderContent 'The item already exists'

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Failed to create catalog item from
'D:' in
'/Carsnet.Reports/DM': System.Exception: Failed to create catalog item: Exception calling "CreateCatalogItem" with "7"
argument(s): "The item '
' already exists. --->
Microsoft.ReportingServices.Diagnostics.Utilities.ItemAlreadyExistsException: The item
'
' already exists." ---> System.Management.Automation.MethodInvocationException:
Exception calling "CreateCatalogItem" with "7" argument(s): "The item '
*' already exists.

(redacted sources and paths)

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Write-RsFolder -ReportServerUri 'http:/mySSRS' -Path c:\myreports -RsFolder /foldertopublishto

What is the expected behavior?

I think maybe a -Force or -Overwrite parameter is needed to overwrite existing reports?

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
PS 5
Windows 10 local, 2012 SSRS
First time trying this cmdlet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.