My signed script not run in schedule task over system account!

This topic contains 1 reply, has 2 voices, and was last updated by  Richard Siddaway 4 years ago.

  • Author
    Posts
  • #10191

    I signed a script and set-executionpolicy allsigned in server. Then I ran in PS shell and answer Always. The certified go to trusted publisher and script always run in shell without prompt me anymore.

    But when I schedule it by system account with higest privileges it not run. It fact the status is running, but the script is stucked and do nothing at all!

    If I set-executionpolicy remotesigned, the task done the job!

    Some help for these foreign Brazilian beginner will be appreciate!! Thank you!!

  • #10193

    Richard Siddaway
    Moderator

    If I understand you correctly you've answered your own question.

    Running the script manually with execution policy of Allsigned you had to answer a question. You can't do that when you run the script through the scheduler so the script didn't run. The question is presumably because the certificate publisher is not classified as trusted.

    Dropping the execution policy to remotesigned took away the interactive question/answer session so the script ran.

    see the help files
    about_Execution_Policies
    about_Signing

    An Internet search will show you how to make the publisher trusted

You must be logged in to reply to this topic.