298 reputation
416
bio website concise-software.blogspot.com
location St. John's, Canada
age
visits member for 4 years, 2 months
seen Dec 17 at 23:49

Jul
2
awarded  Curious
Mar
26
awarded  Popular Question
Feb
14
awarded  Popular Question
Dec
16
awarded  Popular Question
Oct
8
awarded  Notable Question
Jul
5
awarded  Popular Question
Jun
26
awarded  Notable Question
Jun
12
awarded  Notable Question
Nov
29
awarded  Popular Question
Nov
2
awarded  Popular Question
Oct
4
accepted Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?
Oct
3
comment Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?
This is probably paranoia, but I'd be worried about dragging in unintended services with *tomcat*. This is especially risky since the next line immediately invokes Restart-Service. It would probably be better to go step by step and log Get-Service *tomcat*. Where would log.log end up here?
Oct
2
comment Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?
I should have clarified. The command does not require elevation. I had granted privileges I thought were sufficient to the user in the Tomcat6 service's SDDL, but I missed "SW" (EnumDeps).
Oct
2
answered Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?
Oct
2
comment How do I grant permissions to remotely start/stop a service using Powershell?
Please mark this as your correct answer. This was a huge help for me for the exact same issue :)
Oct
2
revised Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?
Updated troubleshooting
Oct
1
comment Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?
I have, it creates an empty file.
Oct
1
comment Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?
Good idea. However, with "Run with highest privileges" checked the result is the same: "return code 1".
Oct
1
asked Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?
Sep
26
awarded  Popular Question