- Windows Remote Management
- Purpose
- Where applicable
- Developer audience
- Run-time requirements
- In this section
- About Windows Remote Management
- Components of WinRM and Hardware Management
- Working with WinRM
- Windows Remote Management на службе системного администратора.
- Как активировать Windows Remote Management с помощью групповой политики
- Служба Удаленного диспетчера Windows (WinRM) не запустится после удалений WinRM 2.0
- Симптомы
- Причина
- Решение
- Восстановление конфигурации WinRM
- Удаление прослушиватель WinRM через порт 5985
Windows Remote Management
Purpose
Windows Remote Management (WinRM) is the Microsoft implementation of WS-Management Protocol, a standard Simple Object Access Protocol (SOAP)-based, firewall-friendly protocol that allows hardware and operating systems, from different vendors, to interoperate.
The WS-Management protocol specification provides a common way for systems to access and exchange management information across an IT infrastructure. WinRM and Intelligent Platform Management Interface (IPMI), along with the Event Collector are components of the Windows Hardware Management features.
Where applicable
You can use WinRM scripting objects, the WinRM command-line tool, or the Windows Remote Shell command line tool WinRS to obtain management data from local and remote computers that may have baseboard management controllers (BMCs). If the computer runs a Windows-based operating system version that includes WinRM, the management data is supplied by Windows Management Instrumentation (WMI).
You can also obtain hardware and system data from WS-Management protocol implementations running on operating systems other than Windows in your enterprise. WinRM establishes a session with a remote computer through the SOAP-based WS-Management protocol rather than a connection through DCOM, as WMI does. Data returned to WS-Management protocol are formatted in XML rather than in objects.
The Intelligent Platform Management Interface (IPMI) WMI provider is a standard WMI provider with classes that obtain BMC sensor data from computers with appropriate hardware. IPMI data can be accessed using the WinRM scripting API, the WMI Scripting, or COM APIs.
Developer audience
The developer audience is the IT Pro who writes scripts to automate the management of servers or the ISV developer obtaining data for management applications.
Run-time requirements
WinRM is part of the operating system. However, to obtain data from remote computers, you must configure a WinRM listener. For more information, see Installation and Configuration for Windows Remote Management. If a BMC is detected at system startup, then the IPMI provider loads; otherwise, the WinRM scripting objects and the WinRM command-line tool are still available.
In this section
Link to public WS-Management protocol specification, WinRM architecture, relationship to WMI, hardware management with the IPMI provider, configuration and installation.
Getting started using the WinRM scripting API and hardware management.
List of scripting interfaces defined by Microsoft Web Services for Management (WS-Management) Automation and class definitions of the WMI classes created by the IPMI provider and classes that communicate with the IPMI driver to obtain baseboard management controller (BMC) data.
About Windows Remote Management
Windows Remote Management is one component of the Windows Hardware Management features that manage server hardware locally and remotely. These features include a service that implements the WS-Management protocol, hardware diagnosis and control through baseboard management controllers (BMCs), and a COM API and scripting objects that allow you to write applications that communicate remotely through the WS-Management protocol. For more information about the public specification for WS-Management protocol, see Web Services for Management (WS–Management).
Components of WinRM and Hardware Management
The following is a list of components and features that are supplied by WinRM and hardware monitoring:
This scripting API enables you to obtain data from remote computers using scripts that perform WS-Management protocol operations.
Winrm.cmd
This command–line tool for system management is implemented in a Visual Basic Scripting Edition file (Winrm.vbs) written using the WinRM scripting API. This tool enables an administrator to configure WinRM and to get data or manage resources. For more information, see the online help provided by the command line Winrm /?.
Winrs.exe
This command line tool enables administrators to remotely execute most Cmd.exe commands using the WS-Management protocol. For more information, see the online help provided by the command line Winrs /?.
Intelligent Platform Management Interface (IPMI) driver and WMI provider
Hardware management through the Intelligent Platform Management Interface (IPMI) provider and driver enables you to control and diagnose remote server hardware through BMCs when the operating system is not running or deployed.
For more information, see the IPMI Provider.
The WMI service continues to run side-by-side with WinRM and provides requested data or control through the WMI plug-in. You can continue to obtain data from standard WMI classes, such as Win32_Process, as well as IPMI-supplied data. For more information about configuration and installation required for WinRM, see Hardware Management Introduction.
WS-Management protocol, a SOAP-based, firewall-friendly protocol, was designed for systems to locate and exchange management information. The intent of the WS-Management protocol specification is to provide interoperability and consistency for enterprise systems that have computers running on a variety of operating systems from different vendors.
WS-Management protocol is based on the following standard web service specifications: HTTPS, SOAP over HTTP (WS-I profile), SOAP 1.2, WS-Addressing, WS-Transfer, WS-Enumeration, and WS-Eventing. For more information about the current draft of the specification, see the Management Specifications Index Page.
Working with WinRM
For more information about writing WinRM scripts, see Using Windows Remote Management.
The following table lists topics that provide information about the WS-Management protocol, WinRM and WMI, how to specify management resources such as disk drives or processes.
Windows Remote Management на службе системного администратора.
Я опишу процесс, каким образом можно централизованно активировать и настроить службу Windows Remote Management (WinRM) на всех целевых компьютерах с помощью Group Security Policy. Windows Remote Management – это специальный сервис, позволяющий администраторам получить возможность удаленного доступа и управления клиентскими и серверными ОС Windows.
Возьмем обычный ПК с Windows 7, который включен в домен, и на котором не активирована функция Windows Remote Management. В командной строке введем следующую команду:
Запустим командную строку с правами администратора.
WinRM enumerate winrm/config/listener
, должно появиться следующее сообщение об ошибке, свидетельствующее о том, что WRM не установлен:
WSMan Fault. The client cannot connect to the destination specified in the request. Error number: – 2144108526 0?80338012
Если нужно настроить WinRM вручную на отдельной системе, достаточно набрать команду:
winrm quickconfig
Это я рассмотрел вариант установки на единичную рабочую станцию.
В том случае, если нужно настроить WinRM на группе компьютеров, то можно воспользоваться специальными параметрами групповой политики. Создадим групповую политику на контейнер где располагаются рабочие станции. Конфигурация компьютера — Политики — Административные шаблоны -> Компоненты Windows – Удаленное управление Windows . Активируем следующие параметры:
• Клиент службы удаленного управления Windows.
• Служба удаленного управления Windows
В разделе IPv4 filter укажем *, что означает, что компьютер может принимать подключения (а значит и управляющие команды) откуда угодно.
Далее в разделе Конфигурация компьютера – Политики — Административные шаблоны – Компоненты Windows – Удаленная оболочка Windows
Разрешить доступ к удаленной оболочке – Включена
Управлять способом запуска служб можно из следующего раздела групповых политик: Конфигурация компьютера – Политики — Конфигурация Windows — Параметры безопасности — Системные службы.
Открыть службу «Служба удаленного управления Windows (WM-Management) и произвести настройки ниже, см. скриншот.
Все готово. Перезагружаем рабочую станцию и после активации WinRM с помощью групповой политики, на клиентской системе проверим статус службы с помощью знакомой команды:
WinRM enumerate winrm/config/listener
Удостоверимся, что тип запуска службы WinRM задан в автоматический . Хотя по факту тип запуска «автоматический с задержкой», т.к. по умолчанию для службы WinRM задана задержка запуска (параметр DelayedAutoStart=1 в ветке HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WinRM ).
После применения групповой политики, данной системой можно управлять удаленно с помощью команд WinRS. Следующая команда откроет командную строку, запущенную на удаленной системе:
winrs –r: cmd
После появления окна командной строки вы можете выполнять и видеть результат выполнения любых команд на удаленном компьютере, как будто бы вы работаете за ним локально. Отметим, что на вашем управляющем компьютере WinRM также должна быть активирована.
В моем случаем тестовая машина называется alektest4
Как активировать Windows Remote Management с помощью групповой политики
В этой статье, я попытаюсь рассказать, каким образом можно централизованно активировать и настроить службу Windows Remote Management (WinRM) на всех целевых компьютерах с помощью групповой политики. Напомню, что Windows Remote Management – это специальный сервис, позволяющий администраторам получить возможность удаленного доступа и управления клиентскими и серверными ОС Windows (и, думаю, если вы ранее пользовались набором утилит Microsoft Sysinternals PSTools, то WRM должен вам понравиться).
Возьмем обычный ПК с Windows 7, который включен в домен, и на котором не активирована функция Windows Remote Management. В командной строке введем следующую команду:
, должно появиться следующее сообщение об ошибке, свидетельствующее о том, что WRM не установлен:
WSMan Fault. The client cannot connect to the destination specified in the request. Error number: — 2144108526 0x80338012
Если нужно настроить WinRM вручную на отдельной системе, достаточно набрать команду:
В том случае, если нужно настроить WinRM на группе компьютеров, то можно воспользоваться специальными параметрами групповой политики. Интересующая нас политика находится в разделе: Computer Configuration -> Policies -> Windows Components -> Windows Remote Management (WinRM) -> WinRM Service. Нужно активировать следующие параметры:
• Allow automatic configuration of listeners
• Allow Basic Authentication
В разделе IPv4 filter укажем *, что означает, что компьютер может принимать подключения (а значит и управляющие команды) откуда угодно, это значит что листенеры на компьютере будет принимать запросы на всех IP интерфейсах.
Затем в разделе Computer Configuration -> Policies -> Windows Components -> Windows Remote Shell активируем пункт:
• Allow Remote Shell Access
И, наконец, нужно задать тип запуска у службы Windows Remote Service в «Автоматический» (Automatically). Напомню, что управлять способом запуска служб можно из следующего раздела групповых политик: Computer Configuration -> Windows Settings -> Security Settings ->System Services.
После активации WinRM с помощью групповой политики, на клиентской системе проверим статус службы с помощью знакомой команды:
Удостоверимся, что тип запуска службы WinRM задан в автоматический . Хотя по факту тип запуска «автоматический с задержкой», т.к. по умолчанию для службы WinRM задана задержка запуска (параметр DelayedAutoStart=1 в ветке HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WinRM ).
Теперь, после активации WinRM с помощью групповой политики, данной системой можно управлять удаленно с помощью команд WinRS. Следующая команда откроет командную строку, запущенную на удаленной системе:
После появления окна командной строки вы можете выполнять и видеть результат выполнения любых команд на удаленном компьютере, как будто бы вы работаете за ним локально. Отметим, что на вашем управляющем компьютере WinRM также должна быть активирована.
Служба Удаленного диспетчера Windows (WinRM) не запустится после удалений WinRM 2.0
В этой статье приводится решение проблемы, из-за которую служба Удаленного диспетчера Windows (WinRM) не запустится после того, как вы удаляйте WinRM 2.0.
Исходная версия продукта: Windows Server 2012 R2, Windows 10 — все выпуски
Исходный номер КБ: 974504
Симптомы
Удаляйте Windows Remote Manager 2.0 (WinRM) с компьютера под управлением Windows Server 2008 или Windows Vista. При попытке запустить службу WinRM с помощью команды net start winrm служба WinRM не запустится, и вы получите сообщение об ошибке «Отказано в доступе».
Причина
Эта проблема возникает при удалить WinRM 2.0, и на порту 5985 был существующий прослушиватель WinRM.
Решение
Чтобы устранить эту проблему, используйте один из следующих методов.
Восстановление конфигурации WinRM
Чтобы восстановить состояние конфигурации WinRM по умолчанию, выполните следующие действия.
Откройте окно командной строки.
В командной строке введите следующую команду, а затем нажмите клавишу ВВОД:
Удаление прослушиватель WinRM через порт 5985
Откройте окно командной строки.
В командной строке введите следующую команду, а затем нажмите клавишу ВВОД:
В нем соревнуются все прослушиватели, которые в настоящее время использует WinRM.
Найдите прослушиватель со следующими параметрами и значениями:
Обратите внимание на значение, которое указано для параметра Address прослушиватель.
Введите следующую команду и нажмите клавишу ВВОД:
winrm delete winrm/config/Listener? Address= Address +Transport=HTTP
В этой команде местом для адреса является значение, которое вы указали в шаге 4.