Author Posts

April 12, 2016 at 5:19 pm

Greetings,
I'm trying to deploy my first Powershell script via an SCCM 2010 R2 package.
These are the errors from execmgr.log:













Any ideas please?
Thanks
David

April 12, 2016 at 5:22 pm

Error lines not displaying?

[LOG[Invalid data file "powershell.exe -noprofile -ExecutionPolicy bypass -file .\RebootAuto.ps1" to execute using file association]LOG]

April 12, 2016 at 5:37 pm

Just curious, what OS are you targeting?

Also, try the following switches. I've had better luck with that in the past.

"powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File .\%PSScript%.ps1"

April 12, 2016 at 5:40 pm

Just updated my reply above. Sorry. 😉

April 12, 2016 at 5:45 pm

Just tried that and got the same error about file association.

April 12, 2016 at 5:56 pm

Silly me. I had quotes around the command in the package definition

April 12, 2016 at 6:02 pm

^_^ I should've thought about that. Well done!