Skip to content

Write-RsRestFolderContent not working in PowerBi Report Server #422

@Terr4

Description

@Terr4

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

What is the current behavior?
When using the Write-RsRestFolderContent function to import a folder structure with reports you get an error message indicating a failure

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

  1. Provide a folder structure with *.RDL files and subfolders
  2. Create a "Migration" Folder on the target SSRS system
  3. Execute the following
$ImportFolder = "C:\private\SRSSEXPORT\";
$sourceRsUri = 'http://localhost/ReportServer/ReportService2010.asmx?wsdl';
$proxy = New-RsWebServiceProxy -ReportServerUri $sourceRsUri;

Write-RsRestFolderContent -RsFolder "Migration" -Path $ImportFolder -Recurse;

Result is:

Write-RsRestFolderContent -RsFolder "Migration" -Path $ImportFolder -Recurse;
OperationStopped: C:\Users\user\Documents\PowerShell\Modules\ReportingServicesTools\0.0.8.0\Functions\CatalogItems\Rest\New-RsRestFolder.ps1:110
Line |
 110 |              throw (New-Object System.Exception("Failed to create fold …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Failed to create folder 'Folder1' in 'Migration': Response status code does not indicate
     | success: 422 (Unprocessable Entity).

What is the expected behavior?
Folders get created in target SSRS and RDL files get uploaded

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?
Powershell 7.4 LTS
Windows Server 2016
First time user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions