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
An Internet search will show you how to make the publisher trusted