microsoft / ReportingServicesTools

Reporting Services Powershell Tools
MIT License
458 stars 213 forks source link

Write-RsRestFolderContent not working in PowerBi Report Server #422

Open Terr4 opened 9 months ago

Terr4 commented 9 months ago

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