Deploy PS script via SCCM package This topic contains 7 replies, has 2 voices, and was last updated by Will Anderson 1 year, 10 months ago. Author Posts April 12, 2016 at 5:19 pm #37615 David ZemdegsParticipant 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 #37616 David ZemdegsParticipant 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 #37617 Will AndersonKeymaster 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:38 pm #37618 David ZemdegsParticipant Windows 7 April 12, 2016 at 5:40 pm #37619 Will AndersonKeymaster Just updated my reply above. Sorry. 😉 April 12, 2016 at 5:45 pm #37620 David ZemdegsParticipant Just tried that and got the same error about file association. April 12, 2016 at 5:56 pm #37621 David ZemdegsParticipant Silly me. I had quotes around the command in the package definition April 12, 2016 at 6:02 pm #37622 Will AndersonKeymaster ^_^ I should've thought about that. Well done! Author Posts You must be logged in to reply to this topic.