Product: PowerShell Universal
Version: 2026.1.3
I’m having an issue working on a file upload script to process a file.
Currently using gMSA account to run this script inside of an App.
I’ve tried every which way to make this happen and the only way its possible is to give modify permission for C:\Windows\SystemTemp to my gMSA account running the application (which i don’t wish to do).
My current test code which works if my gmsa has modify permission on systemtemp, but doesn’t if you remove it:
$IncomingRoot = “C:\PSU\Temp”
New-UDUpload -Text “Upload Test” -OnUpload {
Show-UDToast $Body.Data -Duration 10000
$bytes = [System.Convert]::FromBase64String($Body.Data)
[System.IO.File]::WriteAllBytes(“$IncomingRoot\$($Body.Name)”, $bytes)
}
I believe this to be a limitation of the upload function but I could be wrong, please enlighten me!
I logged into my gMSA through psexec and found that the temp variables are set to the users local appdata folders, so not sure why its defaulting to the systemtemp folder.