23.2 C

How to manage Windows services.

Services are those programs that are usually intended to be run in the background. In addition, the user does not often interact directly with them. Unless he decides to modify their configuration or initiation. It is certainly a term that sounds to many like server-oriented operating systems. However, the reality is that they are also found in desktop-oriented operating systems, including Windows. Services in desktop-oriented Windows operating systems are responsible for running or launching numerous features and tasks. For example, credential management, web account management, automatic time zone update. In addition to remote access, connection through the network, power policy management. It also includes the operating system fax service, in addition to the management of Xbox accessories. Next we will see How to manage Windows services.

Brief introduction to Windows services

You should know that not only Microsoft introduces services on Windows. Indeed, as the user installs things, he will see others coming from elsewhere. For example, if you have installed Firefox, you should see the Mozilla maintenance service. This is also the case with various programs. In order to add a service, it must be installed and registered on Windows. In addition, this process requires an administrator account. It can happen that a user does not allow an application to be installed under the conditions of an administrator. Consequently, it will not be able to create the service that would allow it to run in the background. This requirement is usually very easy to meet in Microsoft’s operating system. However, it is a detail to be considered.

The Windows service panel

Windows has a graphical panel with which the system services can be configured. To access it, just enter the term Services from the search button. Then click on the Services application.

There is also another way to access Windows services. Surely it is more to the taste of advanced users. Indeed, we will be able to do it by means of the Run application. With this in mind, it is enough to press the Win+R combination. Once the window is displayed, enter services.msc and click on the OK button or the enter key.

- Advertisement -

With this, you have access to the Windows services panel. Consequently, we are going to explain how to manage them in a basic way.

Basics of Windows service management

Immediately, the user will be presented with a long list of things that are mostly pre-installed. In addition to others that have been supplied from outside. As mentioned, they can come from an application or an update. It is important to clarify something. If you are not clear about what you are doing, it is best not to touch anything. Indeed, tampering with something sensitive to the system can lead to catastrophic consequences. Therefore, to test safely, it is best to run Windows in a virtual machine. You can also use an unimportant secondary computer. It is also advisable to create a restore point.

These are the basic precautions to take. Now we are going to explain how to deal in a basic way with Windows services. Especially for those users interested in optimizing the operating system a bit. In fact, any inactive service means resources that are not being consumed. In this case, we will use the Windows Event Collector. When you right-click on it, a context menu appears. The options are:

  • Start,
  • Stop
  • Pause
  • Resume
  • Restart
  • All Tasks (this is a submenu),
  • Refresh
  • Properties (allows access to all options)
  • Help.

Here is a rather self-explanatory situation. Start, Stop, Pause, Resume, and Restart are literal actions that apply to the service. That said, generally the available options are Start, Stop and Restart.

Tinkering with Windows services.

However, manipulation of the service via the context menu only affects the current system session. Suppose you shut down or reboot the system. As a result, the service will revert to its default state. To permanently change the state of a service, go to its Properties. It is also possible to access it by double-clicking on it. Then, just select one of the startup options under Startup type. In fact, from there, it is possible to disable it completely to prevent it from starting under any circumstances.

The first type, Automatic (delayed start), causes the service to start automatically after the system startup time has elapsed. This is ideal for those services that are secondary. In addition to, not necessary to have immediately available. Automatic is in charge of starting up the service at system startup. On the other hand, the Manual activation is what we have shown on the service statuses through the contextual menu. However, this is also possible from the Service status section in Properties.

Simple management of Windows services via PowerShell

Windows services can also be managed using CMD or PowerShell. However, we will show how to do it using PowerShell only. Managing services via the command line requires administrator permissions. Don’t worry, this is simple to do. Just run the corresponding option from the start menu.

The management of services through the command line is something that is still a standard in Linux today. It is certainly a bit difficult to learn, as it is less intuitive than a graphical interface. However, once mastered, it is quicker to perform simple tasks. Listing all services is as simple as typing Get-Service and pressing the enter key.

Obviously, listing services in this way is impractical. Therefore, we will restrict the search to locate the service that we have previously manipulated graphically: Windows Event Collector. However, this procedure is available for any service. Let’s try the service that allows us to synchronize the computer’s time with the Internet.

With this in mind, let’s use the command below. It displays all the services whose “DisplayName” field starts with the word “Time”. Additionally, the asterisk (*) is the wildcard that allows you to fill in the remainder with any combination (including missing) of characters. Moreover, it can be composed of letters, digits, and spaces. It is possible to place several, before, after and in the middle of the search term, to restrict or extend the possibilities.

Get-Service -displayname "Time*"

As you can see, the time broker is the only service that matches the criteria of the search performed. At this point, the user has to stick with what appears in the “Name” field. In this specific case: TimeBrokerSvc

Useful commands to manage Windows services from PowerShell

As the service is running, we are going to stop it as follows:

Stop-Service -Name TimeBrokerSvc

To start the service use the word ‘Start’:

Start-Service -Name TimeBrokerSvc 

Restart a service with PowerShell in Windows:

Restart-Service -Name TimeBrokerSvc

Disable a service for the next startup:

Set-Service -Name TimeBrokerSvc -StartupType disabled

Stop a service and disable it:

Stop-Service -Name TimeBrokerSvc -force

Set-Service -Name TimeBrokerSvc -Status stopped -StartupType disabled

Enabling a service for manual management:

Set-Service -Name TimeBrokerSvc -StartupType automatic

Enabling a service and starting it up:

Set-Service -Name TimeBrokerSvc -Status running -StartupType automatic

Remember that you can use these commands with any service. Just replace the name of the Windows service. Okay, so we have learned how to manage Windows services. Bye!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"


Please enter your comment!
Please enter your name here

Latest article