Uploading files to scripts from Portal hangs at waiting for feedback

Uploading files to scripts from Portal hangs at waiting for feedback

avatar

Related to the issue in Issues with scripts that take files as input and run as gMSA - Devolutions Forum I have a role required to run the script, if my coworker who only has "MyRole", they can start the script and upload it, but in the admin console the job sits at "Awaiting user feedback". Opening the job reveals that it is expecting File (as a string).

Considering it works for me as an Administrator, but not for the user who only has MyRole, I assume it's some kind of permissions related issue, but I don't think it should be? Correct me if I'm wrong.

Details are the same as before, my running environment is:

OS: Windows Server 2022
PowerShell Universal: Version 2026.2.5
PSU runs as a Windows Service as LocalSystem


Script is:

#.universal\scripts.ps1 (Sanitized):

New-PSUScript -Name 'Test.ps1' -Description 'Test' -Path 'Test.ps1' -Environment 'PowerShell 7' -Credential 'MyGmsaAccount' -Role @('MyRole') -PortalOutputType 'Text' -Icon 'alert' -DisplayOutputOnExecute -ExecutionRole @('MyRole') 

# Script contents
Param(
    [ComponentModel.DisplayName("Upload File")]
    [File]$File
)
'Filename is {0}' -f $File.FileName

Set-Content -Path 'C:\test.xlsx' -AsByteStream -Value $File.Content


The role they're using is this specific one:

New-PSURole -Name "MyRole" -ClaimType "http://schemas.microsoft.com/ws/2008/06/identity/claims/groups" -ClaimValue "MyRole" 

All Comments (7)

avatar

Hello @tholabrk

Thank you for the detailed report and for including the sanitized configuration.

The Administrator versus MyRole difference is particularly useful here. Since the user can select the file and start the script, but the resulting job remains at “Awaiting user feedback,” I would like to isolate whether this behavior is related specifically to the file parameter handling or to the execution context created by the Run As credential and ExecutionRole.

Could you please confirm whether `MyGmsaAccount` has any role restrictions configured?

If possible, could you also test the same script with the MyRole user after temporarily removing both `-Credential 'MyGmsaAccount'` and `-ExecutionRole @('MyRole')`? This would help determine whether the `[File]` parameter works correctly for the restricted user before the Run As execution context is introduced.

I will also review this behavior against PSU 2026.2.5, including the relationship with your previous file upload/gMSA report.

Best regards,
Ruben Tapia

avatar

Hi @rubentapia, I'll get back to you on this one, as I didn't have time to look into this today, so I hopefully will have an update tomorrow.

avatar

My apologies I did not do my due dilligence here, the issue does not present itself in these simple repro-scripts, and I will have to investigate further what part of my script is causing this issue to present itself.

avatar

Actually, scratch that, it was staring right at me, I failed to notice that I had used Mandatory parameters which I hadn't added to my test repro script.

The actual code that triggers the issue is:

Param(
    [Parameter(Mandatory=$True)]
    [ComponentModel.DisplayName("Upload File")]
    [File]$File
)
'Filename is {0}' -f $File.Filename

Set-Content -Path ($Env:Temp + "\test.xslx") -AsByteStream -Value $File.Content


This happens regardless of environment (Powershell 7 vs Integrated(can't run gMSA)) and whether or not it runs as gMSA or not, whether the execution role is present or not.

This is my final "definition" in scripts.ps1 after testing (sanitized):

New-PSUScript -Name 'Test.ps1' -Description 'Test' -Path 'Subfolder1\Subfolder2\Test.ps1' -Environment 'PowerShell 7' -Role @('MyRole') -PortalOutputType 'Text' -Icon 'alert' -DisplayOutputOnExecute 
avatar

@tholabrk
Thank you for the clarification and for isolating the behavior to the mandatory file parameter.

We will reproduce this scenario today using the simplified configuration you provided. Based on the results, we will escalate accordingly if the behavior is confirmed under the reported conditions.

Best regards,

avatar

Hello @tholabrk

We have now reproduced and isolated the behavior in our lab on PSU 2026.2.5. We also confirmed the same behavior on PSU 2026.2.4, so this does not currently appear to be a regression introduced in 2026.2.5.

We were able to reproduce the “Awaiting user feedback” state when a script uses:

[Parameter(Mandatory=$True)]
[File]$File

and the script is submitted while the file upload is still in progress. In that condition, the job can start before the uploaded file has been associated with the execution. PowerShell then prompts for the missing mandatory parameter, and the job transitions to “Awaiting user feedback.”

We reproduced this condition consistently test. When we waited for the file upload to fully complete before submitting, the file was attached correctly and the job did not enter the feedback state.

We also validated a temporary workaround: remove Mandatory=$True from the File parameter and perform the required-file validation inside the script instead. This completed successfully.

We have enough reproducible evidence now to escalate these findings to the Development team for review.

Best regards,
Ruben Tapia

avatar

Excellent, and yeah I will be creating that workaround in the meantime, thanks again :)