locked
Using RunAs but ps1 workflow uses LocalSystem RRS feed

  • Question

  • Hello forum!

    I dev'ed a workflow running a ps1. I need to run it as a given user, so I decided to add a RunAs account. So far, the MonitoringHost runs as the configured user but the script itself does not. Tracing shows up that it still runs at computername$ (at least the output from $env:username

    Any idea what's going on?

    Thanks,

    Patrick


    http://www.syliance.com | http://www.systemcenterrocks.com

    Wednesday, August 7, 2013 6:17 AM

Answers

  • Hi, $env:username is for interactive users

    as MonitoringHost is executed by HealthService (non-interactive)

    in that case $env:username shows computername$ (local system)

    https://www.ruby-forum.com/topic/162805

    whoami is right here

    Wednesday, August 7, 2013 11:04 AM

All replies