0

I have a simple powershell script which uses Out-Download command to export the query result to .xlsx file. However, it doesn't seem working. The same scenario as well if I used the download button from Show-ListView window.

Here is the script

Import-Function -Name ConvertTo-Xlsx
[byte[]]$outobject = Get-ChildItem master:\ |
    Select-Object -Property Name, ProviderPath, Language, Varsion |
    ConvertTo-Xlsx
Out-Download -Name "report-$datetime.xlsx" -InputObject $outobject

As for my initial investigation, I have noticed that one of the request e.g. https://domain.com/-/script/handle/0D81FB63A4524895A114FFF5C2B4299B is being returned 302 response that leads to 404 page.

Versions used: Sitecore 9.3 Sitecore.PowerShell.Extensions-6.0 Sitecore Experience Accelerator 9.3.0.2589

Please let me know if you need more information.

Appreciate your help.

0

I was able to resolve the issue in reference on the posts below. Basically for Powershell Extension version 6, you have to enable a config for Identity Server in CM environment. Path should be \App_Config\Include\Spe\Spe.IdentityServer.config

Out-Download access denied to user anonymous

Issue elevating SPE Console in 9.1 Azure PaaS

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.