Is it bad practice to run `net start ""` on an already running service (or a service whose status I don't check beforehand)?

ru flag

Disclaimer I'm not familiar with these subjects (services, net command, and server maintenance in general).

On Windows, the net command allows to stop and start services, via net stop "<service name>" and net start "<service name>"

Is it bad practice to run net start "<service name>" on a service whose status is not checked beforehand?

I understand that I could check the service status, and start it only if the status is stopped. But if this is not necessary, why complicate things?

I did try to run the command on an already running service, and Powershell simply responded Le service demandé a déjà été démarré. which might translate to The requested service has already been started. I did not see any bad side effects, but I might overlook a lot of issues.

Use case would be to make sure that a specific service is indeed running.

This specific service is supposed to start automatically. The server that hosts it is configured to reboot every day at a specific time (I have no way to control this), and on some occasions, the service does not automatically start. So while we are investigating the starting issue, I want to temporarily fix this by automatically (via the task scheduler) starting the service at a certain time after the reboot if it is not already running.

br flag
[1] from what i can tell, there is no disadvantage to using `net start` on an already-started service. ///// [2] powershell has a cmdlet to get info about a service. take a look at >>> `Get-Help Get-Service -Full` <<< for some ideas on how to use it.
cv flag

I'm not aware of any negative outcomes of attempting to start a service that's already started. Yes, it's fine.

enter image description here

au flag

It's absolutely ok to launch net start ... without checking, yes.

cn flag

Use case would be to make sure that a specific service is indeed running.

If the service is providing a function or purpose, that would be the test. Otherwise, the service needs to report status correctly - which it currently is not.

Laurent Gabiot avatar
ru flag
I realize my title could be misleading, it is corrected now. The service can report its status just fine. It is only I who don't want to check its status before running the `net start` command. I wonder if it is a bad practice, or if it is a shortcut that is perfectly fine to take.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.