Windows find services running

Содержание
  1. How to open Windows Services Manager in Windows 10
  2. How to open Windows Services Manager
  3. Types of Windows Services startup
  4. Start, stop, disable Windows Services
  5. Manage Services using Command Line
  6. 9 ways to access Services in Windows (all versions)
  7. 1. Access Windows Services using search (all Windows versions)
  8. 2. Use the Start Menu to start Services (Windows 10 only)
  9. 3. Use the Control Panel to access Services (all Windows versions)
  10. 4. Use the Run window to start Services (all Windows versions)
  11. 5. Create a shortcut to Services and place it where you want (all Windows versions)
  12. 6. Use the Command Prompt or PowerShell to start Services (all Windows versions)
  13. 7. Use the Computer Management console to view Services (all Windows versions)
  14. 8. Use Task Manager to access Services (all Windows versions)
  15. 9. Use the Services shortcut from our collection (all versions of Windows)
  16. Why are you accessing your services, in Windows?
  17. How to find windows service exe path
  18. 10 Answers 10
  19. Powershell: How to find out which running services aren’t part of OS and non-MS
  20. 1 Answer 1
  21. Get-ServiceFileInfo source code (PSv5+, but could be adapted to work with lower versions):
  22. Not the answer you’re looking for? Browse other questions tagged powershell service or ask your own question.
  23. Linked
  24. Related
  25. Hot Network Questions
  26. Subscribe to RSS
  27. Управляем службами Windows с помощью PowerShell
  28. ПОЛУЧАЕМ СТАТУС СЛУЖБЫ
  29. ПОЛУЧАЕМ СТАТУС СЛУЖБЫ НА УДАЛЕННЫХ КОМПЬЮТЕРАХ
  30. ОСУЩЕСТВЛЯЕМ ФИЛЬТРАЦИЮ (ИСПОЛЬЗУЯ WHERE-OBJECT)
  31. ЗАВИСИМЫЕ СЛУЖБЫ

How to open Windows Services Manager in Windows 10

At times you may need to open and manage your Windows Services. You may want to stop some service, start it, disable the service, delay its start-up or resume or pause the Windows Service. At such time, the Services Manager, which is a built-in tool in the Windows operating system, will help you. This post will show you how to open your Windows Services, using Services Manager as well as the Command Prompt.

Windows Services are applications that typically start when the computer is booted and run quietly in the background until it is shut down. Strictly speaking, a service is any Windows application that is implemented with the services API and handles low-level tasks that require little or no user interaction.

How to open Windows Services Manager

To open the Windows Services Manager on your Windows 10 computer, do the following:

  1. Right-click on the Start button to open the WinX Menu
  2. Select Run
  3. Type services.msc in the Run box which opens
  4. Windows Services Manager will open.

Here you will be able to start, stop, disable, delay Windows Services.

Let us see how to do this in a bit more detail.

Right-click on your Start button to open the WinX Menu. Select Run. This opens the Run box. Now type services.msc in it and hit Enter to open the Services Manager.

Here, under the Name column, you will see the list of Services running on your system, along with their description. You will also be able to see their Status -whether they are running or stopped, along with the Startup types.

Types of Windows Services startup

Windows 10 offers four start-ups types:

  1. Automatic
  2. Automatic (Delayed Start)
  3. Manual
  4. Disabled.

Start, stop, disable Windows Services

To start, stop, pause, resume or restart any Windows Service, select the Service and right-click on it. You will be offered these options.

If you wish to manage more options, double-click on the Service to open its Properties box.

Here, under the Startup type drop-down menu, you will be able to select the startup type for the Service.

Under Service status, you will see buttons to Start, Stop, Pause, Resume the Service.

In the Properties box, you will also see other tabs like Log On, Recovery & Dependencies, which offer additional options and information.

Once you have made your changes, you will have to click on Apply and restart your computer, for the changes to take effect.

Read: What does Automatic (Trigger Start) and Manual (Trigger Start) mean for Windows Services?

Manage Services using Command Line

You can also use the Command Prompt to start, stop, pause, resume service. To use it, from the WinX Menu, open Command Prompt (Admin) and execute one of the following commands:

To start a service:

To stop a service:

To pause a service:

To resume a service:

Читайте также:  Драйверы для kyocera fs 1320d для windows 10

To disable a service:

It is recommended that you not change the default settings unless you know what you are doing, as this can cause some parts of your operating system to stop working. When you stop, start, or restart a service, any dependent services are also affected, so you want to be careful here.

9 ways to access Services in Windows (all versions)

The Services app in Windows lists all the services that are installed by the operating system, the drivers and apps that you are using. With it, you can set which services run when Windows starts, disable services you do not need, and perform other useful actions. If you need to view all the services that exist in Windows, you need to start the Services app. Here is how to do that in all versions of Windows:

NOTE: This guide covers Windows 10, Windows 7, and Windows 8.1. Some methods work in all three versions of Windows, others just in one or two. For each method, we mention the Windows version in which it works. If you do not know the version of Windows that you have, read this tutorial: What version of Windows do I have installed?

1. Access Windows Services using search (all Windows versions)

One way that works in all versions of Windows is to use search. If you are using Windows 10, click the search box near the Start button, and type “services.” Then, click or tap the search result with the same name.

In Windows 7, click Start, and in the search box above this button, type the word “services.” Click the search result with the same name.

In Windows 8.1, go to the Start screen, and start typing the word “services.” Then, click or tap the “View local services” search result.

2. Use the Start Menu to start Services (Windows 10 only)

Windows 10 is the only Windows version that has a shortcut to, in the Start Menu. To find it, click the Start button, scroll down the list of apps to the letter W and find the “Windows Administrative Tools” folder. Open it, and there you see the Services shortcut. Click on it.

3. Use the Control Panel to access Services (all Windows versions)

Start the Control Panel , and go to “System and Security -> Administrative Tools.”

In the list of Administrative Tools, find and use the Services shortcut.

4. Use the Run window to start Services (all Windows versions)

Press the Win + R keys on your keyboard, to open the Run window . Then, type “services.msc” and hit Enter or press OK.

The Services app window is now open.

5. Create a shortcut to Services and place it where you want (all Windows versions)

You can also create a shortcut for Services and place it on your desktop, pin it to the taskbar or the Start Menu. When you create the shortcut, use the command services.msc as its target.

6. Use the Command Prompt or PowerShell to start Services (all Windows versions)

You can also open Services from the Command Prompt or PowerShell . Type the command services.msc and press Enter on your keyboard.

7. Use the Computer Management console to view Services (all Windows versions)

In all versions of Windows, Services can also be accessed using the Computer Management console. Start by opening Computer Management . On the left side of the Computer Management window, there is a section called Services and Applications. Open it and then double-click Services. All your services are loaded in the center of the window.

8. Use Task Manager to access Services (all Windows versions)

The Task Manager can also be used for launching the Services app. First press the Ctrl + Shift + Esc keys to open Task Manager. If you are doing this on a Windows 10 or Windows 8.1 PC, and the Task Manager opens up in its compact mode , click or tap on “More details.” Then, open the File menu, select “Run new task,” and type the command services.msc in the “Create new task” window. Finally, press Enter on your keyboard or click or tap OK.

9. Use the Services shortcut from our collection (all versions of Windows)

We have created the most extensive collection of shortcuts for Windows. Download it , extract it and you can find the Services shortcut in the Administration Tools sub-folder for your Windows version.

Читайте также:  Dvb tuner windows 10

Why are you accessing your services, in Windows?

We access Services when we set up a new PC or device with Windows, or when performance degrades and we need to improve it by disabling unnecessary services that are automatically run at Windows startup. Before closing this tutorial, tell us why you are using the Services app. Comment below and let’s discuss.

How to find windows service exe path

I have a windows service and I need to create directory to store some info. The directory path must be relative to the windows service exe file. How can get this exe file path ?

10 Answers 10

Tip: If you want to find startup path of installed windows service, look here from registry .

There are keys about windows service

Instead of using a directory relative to the executable, and therefore needing admin privileges, why not use the common application data directory, which is accessible through

This way your app doesn’t need write access to its own install directory, which makes you more secure.

svchost.exe is the executable which runs your service which is in system32. Hence we need to get to the module which is being run by the process.

The default directory for a windows service is the System32 folder. In your service, though, you can change the current directory to the directory that you specified in the service installation by doing the following in your OnStart:

Edit: an even simpler method (but I haven’t tested yet):

This did the trick for me

This will return you the correct path even if running under LocalSystem account which defaults to system32:

If you want to get access of Program Files folder or any other using programming you should use the below code which is provide rights to specific folder.

Powershell: How to find out which running services aren’t part of OS and non-MS

Is there a way to find out using Powershell which running services are non-native to Windows ? In other words, services that aren’t part Windows OS and are non-Microsoft. I want to find out all the services that were installed by our vendors.
Finding out running services is easy:

1 Answer 1

You can’t do with it Get-Service alone, because even though the service-info objects it outputs have a .BinaryPathName property, that property is available in PowerShell Core only and it is not necessarily the true service binary, which is often a DLL hosted by the generic svchost.exe service host.

To find the binary file path in all cases, you must (also) query the service definitions in the registry. Once you have the file path, you can use Get-Item and the .VersionInfo property of the file-info objects returned to extract information such as the product and company name.

The Get-ServiceFileInfo function at the bottom does just that; it allows you to run commands such as:

Get-ServiceFileInfo source code (PSv5+, but could be adapted to work with lower versions):

Not the answer you’re looking for? Browse other questions tagged powershell service or ask your own question.

Linked

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.4.16.39093

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Управляем службами Windows с помощью PowerShell


Начинаем серию переводов, посвященную управлению службами Windows с помощью PowerShell 2.0 и 3.0.
В данном посте будут рассмотрены следующие вопросы управления службами Windows:

  • Получаем статус службы на локальном компьютере
  • Получаем статус службы на удаленном компьютере
  • Осуществляем фильтрацию служб (например, остановленные службы)
  • Зависимые службы

Обозначим начальные условия: Вы работаете под Windows 7 и выше и у Вас имеются права администратора. Все команды рекомендуются выполнять в лабораторной или виртуальной среде, перед тем, как применять в “полевых условиях”.

ПОЛУЧАЕМ СТАТУС СЛУЖБЫ

Давайте начнем с того, что просто получим статус всех служб, запущенных на локальном компьютере. Используем для этого командлет Get-Service.

PowerShell, как правило, не чувствителен к регистру. Вывод приведен на скриншоте ниже.

Каждая строка представляет собой объект службы (service object).Каждый сервисный объект, как правило, имеет свои свойства. Вы можете открыть их, просто передав эти объекты в другую команду, Get-Member.

Читайте также:  Windows form image resource

Результаты приведены на скриншоте ниже.

Параметр Typename сверху говорит о том, что за объект перед нами; в данном случае это System.ServiceProcess.ServiceController. На скриншоте также обведены свойства объекта. Это атрибуты, которые описывают этот тип объекта. Хотя большинство из них не используются при отображении по умолчанию, вы можете использовать их, если вы их знаете.
Например, нам интересно посмотреть информацию только о Windows Update. Через Get-Service получим информацию только о некоторых ее свойствах.

Как я узнал, что могу напечатать имя службы? Посмотрел с помощью Get-Service.
PS C:\> help get-service

Вы можете получить полную справочную информацию, напечатав:

Информацию о службе можно получить по ее имени или даже начальным буквам имени.

Или если вам удобнее работать с отображаемыми именами, используйте параметр –Displayname.

Я должен использовать имя параметра, чтобы PowerShell воспринимал значения в качестве отображаемого имени, а не фактического имени службы. Команда будет выглядеть так:

Параметр –Name можно не печатать.

ПОЛУЧАЕМ СТАТУС СЛУЖБЫ НА УДАЛЕННЫХ КОМПЬЮТЕРАХ

До этого нас интересовало получение информации о статусе служб на локальном компьютере. Однако управление службами осуществляется на удаленных компьютерах. Если посмотреть справку по Get-Service, то можно увидеть наличие у этого командлета параметра –Computername. В данном случае подключение к удаленным компьютерам осуществляется без включения функции удаленного управления PowerShell. Если вы можете управлять службами, используя инструменты командной строки (sc.exe или консоль управления Service Manager), вы можете использовать PowerShell. Давайте взглянем на пример:

Любая команда, которую я демонстрировал, можно использовать для передачи удаленному компьютеру. Даже нескольким компьютерам, если у вас есть соответствующие права на удаленном компьютере. Если вы используете PowerShell v3, то можно легко выбрать одну службу на множестве компьютеров.

Для наглядности представления отформатируем вывод.

Тот же самый результат, но в PowerShell v2.

ОСУЩЕСТВЛЯЕМ ФИЛЬТРАЦИЮ (ИСПОЛЬЗУЯ WHERE-OBJECT)

Фильтрация служб осуществляется с помощью командлета Where-Object (where – сокращение для командлета). Все, что нам нужно от PowerShell в этом случае, так это получить только те службы, у которых статус равен “stopped”.

PowerShell получает информацию обо всех службах и передает их (с помощью “|”) в следующую команду, которая осуществляет просмотр каждого объекта. Если свойство статуса объекта равно “stopped”, она остается в конвейере (pipeline), в противном случае она из него исключается. В конце выражение PowerShell отображает те объекты, которые остались в конвейере.
Результаты приведены ниже.

Теперь давайте попробуем найти одну службу на нескольких машинах. Вывод отформатируем в таблицу.

Мы даже можем комбинировать запрос отдельных служб с их фильтрацией.

Эта команда находит все службы на компьютере CHI-DC03, которые начинаются с ‘WIN’, но отображает только те, которые запущены.
Также можно сгруппировать объекты по свойству статуса (status property).

Переменная $dc03 является объектом GroupInfo.

Свойство Group представляет собой коллекцию связанных служб.

Написанное выше проще понять, если взглянуть на скриншот.

Что касается меня, то я бы предпочел использовать хеш-таблицу.

Теперь каждое имя представляет собой свойство в хеш-таблице. Если у вас имеется опыт работы с PoweShell, вы, возможно, подумываете сделать сделующее:

Однако ничего не произойдет. Потому что свойство Status является просто перечислением (enumeration) для [System.ServiceProcess.ServiceControllerStatus] .NET клас и такие свойства, как Running и Stopped представляют собой целые числа. PowerShell осуществляет конвертацию, чтобы представить в более наглядной форме.

В чем суть параметра –AsString, на мой взгляд, достаточно очевидно. Теперь работать с хеш-таблицей стало проще.

Следующей задачей на повестке дня является проверка зависимостей сервера (server dependencies).

Требуемые службы

PowerShell позволяет просто получить статус всех служб, которые требуется для данной службы, даже на удаленном компьютере.

Параметр –RequiredServices передаст объект в конвейер для каждой требуемой службы. Вы можете даже пойти дальше и проверить требуемые службы для работы данной службы.

Параметр –Computername командлета Get-Service возьмет вывод, но только для тех объектов, у которых есть объект свойство Computername – именно поэтому я использую хеш-таблицу с Select-Object. Как мы видим проблем со службой DNS на компьютере CHI-DC03 нет.

ЗАВИСИМЫЕ СЛУЖБЫ

Мы можем сделать то же самое с зависимыми службами. Если таковых не имеется, в конвейер ничего передано не будет.

Требуемые и зависимые службы также являются частью каждого объекта службы.

А пока Вы можете получить все зависимости для всех служб, следующая команда

Это не даст вам особо полезную информацию, поэтому я рекомендую осуществлять запрос по конкретным службам. Команда работает гораздо лучше PowerShell v3.

Результаты видны на скриншоте ниже.

Чтобы получить подобные результаты в PowerShell v2, вам придется передать имена компьютеров (computernames) в Get-Service.

В следующей статье будет рассмотрен запуск, остановка и перезапуск служб.
Конец перевода.

Оцените статью