Problem Running Powershell Scripts With Task Sequence

Has anyone been able to use the 'Run Command Line' task sequence task and while specifying  "RUN AS" credentials  and get a PowerShell script to run?

 

I have been trying to get PowerShell scripts to run from the 'Run Command Line'  task while specifying a "RUN AS" account  for a while now with no success.

 

Here is the syntax I use in the task sequence step: Powershell.exe -Executionpolicy Bypass -File .\filename.ps1

Scripts seem to run fine when you don't specify a "RUN AS" account. Why would specifiny an account in the GUI break things? Anyone have thoughts?





June 18th, 2015 11:32am

Hi,

Have you tried the script with PSExec, -l option allows to run process as limited user?

Does it make any difference if you give the full path of powershell.exe?

Free Windows Admin Tool Kit Click here and download it now
June 21st, 2015 11:00pm

Hi Daniel

Full path did not make a difference. Have not tried using PSExec. Have you had any success using the Run Command Line step using a PowerShell script with specifying alternate credentials?

-Tony

July 15th, 2015 5:51pm

I just gave up using "run as" I could not figure it out for the life of me.
Free Windows Admin Tool Kit Click here and download it now
July 30th, 2015 2:12pm

I just gave up using "run as" I could not figure it out for the life of me.
  • Marked as answer by Tony Chirillo Thursday, July 30, 2015 6:09 PM
July 30th, 2015 6:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics