SCCM/MECM - Task Sequence - Run command "as a different account" issues

345 views Asked by At

I'm here today to talk about a MECM task sequence I'm having a problem with.

Context: The idea is to make the TS available in the software center so that the process can be launched by a user from his active session by collecting some informations about him. The TS collects the information from the current user/domain and then launches a powershell script using an account with specific rights in a command line. The user/session parameters will be used in the script.

Informations are collected with the "quser" command.

Problem: The problem I encounter today is that whatever account I want to use to launch the command line, the step is failing.

The logs show that the file (the ps1 script) is not found. The error is the same if I indicate the full path to the file. I tried to use the -session: option from serviceUI.exe (collected with "quser" command) but it still does not work.

Command line used: serviceui.exe -process:TSProgressUI.exe -session:%CurrentUserSessionID% %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -File "scriptpath.ps1" -User "%userVAR%" -Domain "%userDomainVAR%"

Any idea or suggestion ?

0

There are 0 answers