![]() ![]() And importantly, PsService works with remote computers. Like SC, PsService allows you to start, stop or restart your service from the command line. If you’re familiar with the amazing (and free) tools from Microsoft’s SysInternals group, you should definitely check out their PsService utility. Method #3: Install and run Microsoft’s PsService For example, if you call “SC STOP” immediately followed by “SC START”, the start command will fail if the service takes a few seconds to stop. Unfortunately, that behavior can cause complications in batch files. It will not wait for the service to transition to the desired state. When starting or stopping a service, SC simply makes a request and exits. Run SC /? to see the full set of options available. In fact, it supports many more settings than the Services application does. You can use it to change a service’s properties as well. SC can do much more than start or stop a service. ![]() You can call SC from a batch file, which makes it suitable for non-interactive scenarios. With SC, you can easily start or stop a service. SC is a standard utility that is available on every Windows computer. If not, the command could fail because of insufficient permissions. To stop a Windows Service on another machine, run:įor example, to stop the Spooler service on our file server (named “ctc-file-server”), we run:īe sure to run SC from an elevated command prompt - run as an administrator. ![]() If you’re comfortable working from the command prompt, the SC utility should be in your toolbox. Method #2: Run SC with the “server” command line parameter As a result, this approach is not suitable for non-interactive situations. You can’t call Services from a batch file. You (or your tech) must log in, start Services, connect to the remote PC and start the service. For example, you can disable the service, setup failure actions or change the log on account. Services is a standard utility that is available on every Windows computer.īesides starting or stopping the service, you can also update the service’s properties. If that didn’t work, you may need to update your security settings. ![]()
0 Comments
Leave a Reply. |