question

Jonashrvall-2889 avatar image
0 Votes"
Jonashrvall-2889 asked Jonashrvall-2889 answered

SCCM Package - Create Package restart Spooler Service

Hi I want a package to restart the spooler Service I have make a package contains - RestartSpooler.ps1 Restart-Service -Name Spooler -Force command Line - Powershell.exe -ExecutionPolicy Bypass -Command .\RestartSpooler.ps1 Enviroment ![100603-image.png][1] It dosent works , What is wrong ? [1]: /answers/storage/attachments/100603-image.png

mem-cm-site-deployment
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jason-MSFT avatar image
0 Votes"
Jason-MSFT answered

How do you know it didn't work?

Have you reviewed the logs? execmgr.log on the client specifically and maybe even the event log?

Why use PowerShell at all instead of just sc.exe which wouldn't require any content in the package?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Jonashrvall-2889 avatar image
0 Votes"
Jonashrvall-2889 answered

Hi Jason-MSFT Thanks for your answer, I though I saw red lines about the script. It working now ;-) ![100670-image.png][1] [1]: /answers/storage/attachments/100670-image.png

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.