- System control services windows service
- Что такое msc оснастка
- Элементы оснастки Консоли управления msc
- Список msc оснасток для Windows Server
- Списка команд элементов Панели управления Windows
- Introduction to Windows Service Applications
- Service Applications vs. Other Visual Studio Applications
- Service Lifetime
- Types of Services
- Services and the ServiceController Component
- Requirements
System control services windows service
msc windows оснастки
Добрый день уважаемые читатели и подписчики блога, сегодня мы с вами поговорим на тему как открыть msc windows оснастки через командную строку, для чего это может быть вам нужно и как это поможет в повседневной практике системного администратора. Поверьте полученные знания в этой статье, в будущем смогут вам сэкономить огромное количество времени и нервных клеток, не говоря уже о возможности блеснуть задротскими знаниями перед вашими коллегами, просто если вы активно используете linux системы и знаете основные команды в консоли, то вам будет интересны и эти. Всегда по возможности стремитесь изучать по мимо GUI интерфейсов, еще и альтернативные методы настройки, так как при настройке Windows Server, все чаще выбирают режим core с минималистическим интерфейсом.
Что такое msc оснастка
И так msc в Windows расшифровывается как Microsoft System Console, еще проще это окна или как их еще называют оснастки, для управления теми или иными функциями операционной системы. Ранее я вас уже знакомил с методом создания удобной оснастки mmc, в которой мы добавляли все, что нужно системному администратору для повседневного администрирования.
И вы наверно спросите, а при чем тут командная строка и все такое, а вот при чем. Представим себе ситуацию, у вас в организации существует домен Active Directory, рядовые пользователи не имеют прав локального администратора на своих рабочих станциях, все идет и работает как часы, случается ситуация, что например вам нужно у пользователя поменять какие либо настройки, и сделать нужно сейчас, так что искать эти настройки в групповой политике нет времени. Что делать заходить под собой не вариант, так как нужно произвести изменения в другом профиле пользователя, и как открыть например оснастку Управление компьютером или Система.
Во тут нам и поможет знание названия msc windows оснасток и командная строка. Все что вам нужно это открыть командную строку от имени администратора и ввести нужное название msc оснастки. Ниже представлен список. Как видите открыв командную строку cmd.exe я для примера ввел значение открывающее панель управления с правами администратора системы.
Элементы оснастки Консоли управления msc
- appwiz.cpl — Установка и удаление программ
- certmgr.msc — Сертификаты
- ciаdv.msc — Служба индексирования
- cliconfg — Программа сетевого клиента SQL
- clipbrd — Буфер обмена
- compmgmt.msc — Управление компьютером
- dcomcnfg — Консоль управления DCOM компонентами
- ddeshare — Общие ресурсы DDE (на Win7 не работает)
- desk.cpl — Свойства экрана
- devmgmt.msc — Диспетчер устройств
- dfrg.msc — Дефрагментация дисков
- diskmgmt.msc — Управление дисками
- drwtsn32 — Dr.Watson
- dxdiag — Служба диагностики DirectX
- eudcedit — Редактор личных символов
- eventvwr.msc — Просмотр событий
- firewall.cpl — настройки файерволла Windows
- gpedit.msc — Груповая политика
- fsmgmt.msc — Общие папки
- fsquirt — Мастер передачи файлов Bluetooth
- chkdsk — Проверка дисков (обычно запускается с параметрами буква_диска: /f /x /r)
- control printers — Принтеры и факсы — запускается не всегда
- control admintools — Администрирование компьютера — запускается не всегда
- control schedtasks — Назначенные задания (планировщик)
- control userpasswords2 — Управление учётными записями
- compmgmt.msc — Управление компьютером (compmgmt.msc /computer=pc — удаленное управление компьютером pc)
- lusrmgr.msc — Локальные пользователи и группы
- mmc— создание своей оснастки
- mrt.exe — Удаление вредоносных программ
- msconfig — Настройка системы (автозапуск, службы)
- mstsc — Подключение к удаленному рабочему столу
- ncpa.cpl — Сетевые подключения
- ntmsmgr.msc — Съёмные ЗУ
- mmsys.cpl — Звук
- ntmsoprq.msc — Запросы операторов съёмных ОЗУ (для XP)
- odbccp32.cpl — Администратор источников данных
- perfmon.msc — Производительность
- regedit — Редактор реестра
- rsop.msc — Результатирующая политика
- secpol.msc — Локальные параметры безопасности (Локальная политика безопасности)
- services.msc — Службы
- sfc /scannow — Восстановление системных файлов
- sigverif — Проверка подписи файла
- sndvol — управление громкостью
- sysdm.cpl — Свойства системы
- syskey — Защита БД учётных записей
- taskmgr — Диспетчер задач
- utilman Диспетчер служебных программ
- verifier Диспетчер проверки драйверов
- wmimgmt.msc — Инфраструктура управления WMI
Список msc оснасток для Windows Server
Давайте рассмотрим как запускаются Административные оснастки Windows из командной строки cmd.exe
- domain.msc — Active Directory домены и доверие
- dsa.msc — Active Directory Пользователи и компьютеры (AD Users and Computers)
- tsadmin.msc — Диспетчер служб терминалов (Terminal Services Manager)
- gpmc.msc — Консоль управления GPO (Group Policy Management Console)
- gpedit.msc — Редактор объектов локальной политики (Group Policy Object Editor)
- tscc.msc — Настройка терминального сервера (TS Configuration)
- rrasmgmt.msc — Маршрутизация и удаленый доступ (Routing and Remote Access)
- dssite.msc — Active Directory Сайты и Доверие (AD Sites and Trusts)
- dompol.msc — Политика безопасности домена (Domain Security Settings)
- dсpol.msc — Политика безопасности контроллера домена (DC Security Settings)
- dfsgui.msc — Распределенная файловая система DFS (Distributed File System)
- dnsmgmt.msc — DNS
- iscsicpl.exe — Инициатор ISCSI
- odbcad32.exe — Администратор источника данных ODBC 32 бита
- odbcad64.exe — Администратор источника данных ODBC 64 бита
- powershell.exe -noexit -command import-module ActiveDirectory — Модуль powershell Active Directory
- dfrgui.exe — Оптимизация дисков
- taskschd.msc /s — Планировщик заданий
- dsac.exe — Центр администрирования Active Directory
- printmanagement.msc — Управление печатью
- vmw.exe — Средство активации корпоративных лицензий
- eventvwr.msc /s — Просмотр событий
- adsiedit.msc — Редактор ADSIedit
- wbadmin.msc — Система архивации данных Windows Server
- ServerManager.exe — Диспетчер серверов
- dhcpmgmt.msc — DHCP сервер
Как видите msc windows оснастки очень полезные инструменты системного администрирования. Мне даже некоторые оснастки быстрее открыть чем щелкать мышкой по куче окон, особенно если сервер или компьютер тормозит или нет мышки. Да и в любом случае знать такие вещи всегда полезно. Большая часть всего, что мы используем хранится в c:\Windows\System32. Если вы пройдете в эту папку то сможете обнаружить очень много интересного.
nbtstat -a pc — имя пользователя работающего за удаленной машиной pc
net localgroup group user /add — Добавить в группу group, пользователя user
net localgroup group user /delete — Удалить пользователя из группы
net send pc »текст ‘‘ — отправить сообщение пользователю компьютера pc
net sessions — список пользователей
net session /delete — закрывает все сетевые сессии
net use l: \\имя компа\папка\ — подключить сетевым диском l: папку на удаленном компьютере
net user имя /active:no — заблокировать пользователя
net user имя /active:yes — разблокировать пользователя
net user имя /domain — информация о пользователе домена
net user Имя /add — добавить пользователя
net user Имя /delete — удалить пользователя
netstat -a — список всех подключений к компьютеру
reg add — Добавить параметр в реестр
reg compare — Сравнивать части реестра.
reg copy — Копирует из одного раздела в другой
reg delete — Удаляет указанный параметр или раздел
reg export — Экспортировать часть реестра
reg import — Соответственно импортировать часть реестра
reg load — Загружает выбранную часть реестра
reg query — Выводит значения заданной ветки реестра
reg restore — Восстанавливает выбранную часть реестра из файла
reg save — Сохраняет выбранную часть реестра
reg unload — Выгружает выбранную часть реестра
shutdown — выключение компьютера , можно удаленно выключить другой.
SystemInfo /s machine — покажет много полезного об удаленной машине
Списка команд элементов Панели управления Windows
- control /name Microsoft.AutoPlay — Автозапуск
- control /name Microsoft.OfflineFiles — Автономные файлы
- control /name Microsoft.AdministrativeTools — Администрирование
- control /name Microsoft.BackupAndRestore — Архивация и восстановление
- control /name Microsoft.WindowsFirewall — Брандмауэр Windows Windows
- control /name Microsoft.Recovery — Восстановление
- control /name Microsoft.DesktopGadgets — Гаджеты рабочего стола
- control /name Microsoft.DateAndTime — Дата и Время
- control /name Microsoft.DeviceManager — Диспетчер устройств
- control /name Microsoft.CredentialManager — Диспетчер учетных данных
- control /name Microsoft.HomeGroup — Домашняя группа
- Windowscontrol /name Microsoft.WindowsDefender — Защитник Windows
- control /name Microsoft.Sound — Звук
- control /name Microsoft.NotificationAreaIcons — Значки области уведомлений
- control /name Microsoft.GameControllers — Игровые устройства
- Keyboardcontrol /name Microsoft.Keyboard — Клавиатура
- control /name Microsoft.Mouse — Мышь
- control /name Microsoft.TaskbarAndStartMenu — Панель задач и меню «Пуск»
- control — Панель управления
- control /name Microsoft.Fonts — Папка «Fonts»
- control /name Microsoft.IndexingOptions — Параметры индексирования
- control /name Microsoft.FolderOptions — Параметры папок
- control /name Microsoft.PenAndTouch — Перо и сенсорные устройства
- control /name Microsoft.Personalization — Персонализация
- control /name Microsoft.RemoteAppAndDesktopConnections — Подключения к удаленным рабочим столам
- control /name Microsoft.GetPrograms — Получение программ
- control /name Microsoft.GettingStarted — Приступая к работе
- control /name Microsoft.ProgramsAndFeatures — Программы и компоненты
- сontrol /name Microsoft.DefaultPrograms — Программы по умолчанию
- control /name Microsoft.SpeechRecognition — Распознавание речи
- control /name Microsoft.ParentalControls — Родительский контроль
- control /name Microsoft.InternetOptions — Свойства обозревателя
- control /name Microsoft.TextToSpeech — Свойства речи
- control /name Microsoft.System — Система
- control /name Microsoft.ScannersAndCameras — Сканеры и камеры
- control /name Microsoft.PerformanceInformationAndTools — Счетчики и средства производительности
- control /name Microsoft.PhoneAndModem — Телефон и модем
- control /name Microsoft.ColorManagement — Управление цветом
- control /name Microsoft.Troubleshooting — Устранение неполадок
- control /name Microsoft.DevicesAndPrinters — Устройства и принтеры
- control /name Microsoft.UserAccounts — Учетные записи пользователей
- control /name Microsoft.MobilityCenter — Центр мобильности
- control /name Microsoft.WindowsUpdate — Центр обновления
- control /name Microsoft.ActionCenter — Центр поддержки
- control /name Microsoft.SyncCenter — Центр синхронизации
- control /name Microsoft.EaseOfAccessCenter — Центр специальных возможностей
- control /name Microsoft.NetworkAndSharingCenter — Центр управления сетями и общим доступом
- control /name Microsoft.BitLockerDriveEncryption — Шифрование диска
- control /name Microsoft.Display — Экран
- control /name Microsoft.PowerOptions — Электропитание
- control /name Microsoft.RegionAndLanguage — Язык и региональные стандарты
Если у вас есть чем дополнить список msc канонических имен, то пишите пожалуйста в комментариях я их допишу.
Introduction to Windows Service Applications
Microsoft Windows services, formerly known as NT services, enable you to create long-running executable applications that run in their own Windows sessions. These services can be automatically started when the computer boots, can be paused and restarted, and do not show any user interface. These features make services ideal for use on a server or whenever you need long-running functionality that does not interfere with other users who are working on the same computer. You can also run services in the security context of a specific user account that is different from the logged-on user or the default computer account. For more information about services and Windows sessions, see the Windows SDK documentation.
You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.
You create your service as a Microsoft Visual Studio project, defining code within it that controls what commands can be sent to the service and what actions should be taken when those commands are received. Commands that can be sent to a service include starting, pausing, resuming, and stopping the service; you can also execute custom commands.
After you create and build the application, you can install it by running the command-line utility InstallUtil.exe and passing the path to the service’s executable file. You can then use the Services Control Manager to start, stop, pause, resume, and configure your service. You can also accomplish many of these same tasks in the Services node in Server Explorer or by using the ServiceController class.
Service Applications vs. Other Visual Studio Applications
Service applications function differently from many other project types in several ways:
The compiled executable file that a service application project creates must be installed on the server before the project can function in a meaningful way. You cannot debug or run a service application by pressing F5 or F11; you cannot immediately run a service or step into its code. Instead, you must install and start your service, and then attach a debugger to the service’s process. For more information, see How to: Debug Windows Service Applications.
Unlike some types of projects, you must create installation components for service applications. The installation components install and register the service on the server and create an entry for your service with the Windows Services Control Manager. For more information, see How to: Add Installers to Your Service Application.
The Main method for your service application must issue the Run command for the services your project contains. The Run method loads the services into the Services Control Manager on the appropriate server. If you use the Windows Services project template, this method is written for you automatically. Note that loading a service is not the same thing as starting the service. See «Service Lifetime» below for more information.
Windows Service applications run in a different window station than the interactive station of the logged-on user. A window station is a secure object that contains a Clipboard, a set of global atoms, and a group of desktop objects. Because the station of the Windows service is not an interactive station, dialog boxes raised from within a Windows service application will not be seen and may cause your program to stop responding. Similarly, error messages should be logged in the Windows event log rather than raised in the user interface.
The Windows service classes supported by the .NET Framework do not support interaction with interactive stations, that is, the logged-on user. The .NET Framework also does not include classes that represent stations and desktops. If your Windows service must interact with other stations, you will need to access the unmanaged Windows API. For more information, see the Windows SDK documentation.
The interaction of the Windows service with the user or other stations must be carefully designed to include scenarios such as there being no logged on user, or the user having an unexpected set of desktop objects. In some cases, it may be more appropriate to write a Windows application that runs under the control of the user.
Windows service applications run in their own security context and are started before the user logs into the Windows computer on which they are installed. You should plan carefully what user account to run the service within; a service running under the system account has more permissions and privileges than a user account.
Service Lifetime
A service goes through several internal states in its lifetime. First, the service is installed onto the system on which it will run. This process executes the installers for the service project and loads the service into the Services Control Manager for that computer. The Services Control Manager is the central utility provided by Windows to administer services.
After the service has been loaded, it must be started. Starting the service allows it to begin functioning. You can start a service from the Services Control Manager, from Server Explorer, or from code by calling the Start method. The Start method passes processing to the application’s OnStart method and processes any code you have defined there.
A running service can exist in this state indefinitely until it is either stopped or paused or until the computer shuts down. A service can exist in one of three basic states: Running, Paused, or Stopped. The service can also report the state of a pending command: ContinuePending, PausePending, StartPending, or StopPending. These statuses indicate that a command has been issued, such as a command to pause a running service, but has not been carried out yet. You can query the Status to determine what state a service is in, or use the WaitForStatus to carry out an action when any of these states occurs.
You can pause, stop, or resume a service from the Services Control Manager, from Server Explorer, or by calling methods in code. Each of these actions can call an associated procedure in the service (OnStop, OnPause, or OnContinue), in which you can define additional processing to be performed when the service changes state.
Types of Services
There are two types of services you can create in Visual Studio using the .NET Framework. Services that are the only service in a process are assigned the type Win32OwnProcess. Services that share a process with another service are assigned the type Win32ShareProcess. You can retrieve the service type by querying the ServiceType property.
You might occasionally see other service types if you query existing services that were not created in Visual Studio. For more information on these, see the ServiceType.
Services and the ServiceController Component
The ServiceController component is used to connect to an installed service and manipulate its state; using a ServiceController component, you can start and stop a service, pause and continue its functioning, and send custom commands to a service. However, you do not need to use a ServiceController component when you create a service application. In fact, in most cases your ServiceController component should exist in a separate application from the Windows service application that defines your service.
For more information, see ServiceController.
Requirements
Services must be created in a Windows Service application project or another .NET Framework–enabled project that creates an .exe file when built and inherits from the ServiceBase class.
Projects containing Windows services must have installation components for the project and its services. This can be easily accomplished from the Properties window. For more information, see How to: Add Installers to Your Service Application.