Execute-ProcessAsUser Error

I’m trying to use Execute-ProcessAsUser without success.

I’m deploying a software using SCCM to the user.

This one works :

Execute-ProcessAsUser -UserName xxx\xxxxxx.a -Path "$DirFiles\ImpaxClientSetup.exe" -Wait $True -Parameters $appInstallEXEParameters -RunLevel HighestAvailable

This one fails even when I’m logged on with the same account xxx\xxxxxx.a :

Execute-ProcessAsUser -Path "$DirFiles\ImpaxClientSetup.exe" -Wait $True -Parameters $appInstallEXEParameters -RunLevel HighestAvailable

[Installation] :: Create scheduled task to run the process [C:\WINDOWS\ccmcache\1r\Files\ImpaxClientSetup.exe /S /v"APPSERVER=xxxxx.xxx.xxx.xx ALLUSERS=1 USERNAME=\"AGFA HCES\" COMPANYNAME=\"AGFA HCES\" /quiet /log C:\Windows\Logs\Software\ImpaxClient.log"] as the logged-on user [True]...	Execute-ProcessAsUser	4/24/2020 9:13:40 AM	4328 (0x10E8)
[Installation] :: [C:\WINDOWS\System32\schtasks.exe] is a valid fully qualified path, continue.	Execute-Process	4/24/2020 9:13:40 AM	4328 (0x10E8)
[Installation] :: Working Directory is [C:\WINDOWS\System32].	Execute-Process	4/24/2020 9:13:40 AM	4328 (0x10E8)
[Installation] :: Executing [C:\WINDOWS\System32\schtasks.exe /create /f /tn PSAppDeployToolkit-ExecuteAsUser /xml "C:\Users\Public\PSAppDeployToolkit\PSAppDeployToolkit-ExecuteAsUser.xml"]...	Execute-Process	4/24/2020 9:13:40 AM	4328 (0x10E8)
[Installation] :: Standard error output from the process: Erreur : La relation d'approbation entre le domaine principal et le domaine approuvé a échoué. ==> **"Trust relationship between primary domain and trusted domain failed"** (35,5):LogonType:	Execute-Process	4/24/2020 9:13:41 AM	4328 (0x10E8)
[Installation] :: Execution completed with exit code [1].	Execute-Process	4/24/2020 9:13:41 AM	4328 (0x10E8)
[Installation] :: Failed to create the scheduled task by importing the scheduled task XML file [C:\Users\Public\PSAppDeployToolkit\PSAppDeployToolkit-ExecuteAsUser.xml].	Execute-ProcessAsUser	4/24/2020 9:13:41 AM	4328 (0x10E8)

I just don’t want to be the only one able to deploy a software.
How can I make this work ?

It appears to be a security problem

Execute-ProcessAsUser -Path "$DirFiles\ImpaxClientSetup.exe" -Wait $True -Parameters $appInstallEXEParameters -RunLevel HighestAvailable

Is this script running under windows system account