- Remove From My Forums
-
Question
-
First, I’ve found a workaround (config directly in the registry), so this is not urgent.
Second, I think this specifically relates using WinRM with WinHTTP when WinHTTP has addresses on the IP listen list. We have some similarly configured boxes with nothing on the IP listen list — they don’t have this problem.
My question is: what am I doing wrong? I suspect there’s something peculiar in our environment. I’ve done a fair amount of googling on this and haven’t yet managed to find anyone with an identical problem. Or a solution to mine (who knows, I’ve probably cruised right past it several times now). Which is why I’m posting this.
Symptoms:
- Summary: error code 0x80338012, 2150858770 or -2144108526 when trying to use the winrm command line or powershell wsman driver — even after I’m able to create and use remote sessions hosted on the machines in question
- Detailed error output — note that every winrm command I’ve tried gives this error, not just winrm quickconfig
output from winrm quickconfig winrm.cmd : WSManFault + CategoryInfo : NotSpecified: (WSManFault:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Message = The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". Error number: -2144108526 0x80338012The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
output from Set-WSManQuickConfig or Enable-PSRemoting WinRM already is set up to receive requests on this machine. <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150858770" Machine="xxx.yyy.com"> <f:Message>The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". </f:Message></f:WSManFault>
output from dir WSMan:\localhost (in PowerShell) The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
Workaround:
- Summary: directly configure a listener in the registry at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN
- Details:
- make sure the host’s main address is in the IP listen list (httpcfg set iplisten -i nn.nn.nn.nn — I rebooted after this, but net stop http/net start http might have worked)
- at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN\Listener, add a subkey with a name like IP:nn.nn.nn.nn +HTTP
- under this key, add two values:
- one DWORD with name=Port data=0x1761,
- one SZ with name=uriprefix, data=wsman
- restart the remote management service (service name: WinRM, description: Windows Remote Management (WS-Management))
- Drawbacks:
- the winrm command line and powershell wsman drive are still broken
- it only listens to the addresses in the IP listen list and always listens to all of them:
- using IP:nn.nn.nn.nn +HTTP as the WSMAN\Listener subkey has the same effect as using *+HTTP
- I also tried adding value name=hostname data=nn.nn.nn.nn (stab in the dark). No effect.
- adding WSMAN\Server value name=IPv4Filter value=nn.nn.nn.nn causes it to listen on NO addresses (I may have fat-fingered something here, but I tried it twice with the same effect)
-
Edited by
Wednesday, January 13, 2010 6:52 PM
spacing, yet again
В этой статье мы рассмотрим, как централизованно включить и настроить службу удаленного управления Windows Remote Management (WinRM) на компьютерах домена с помощью групповых политик. Напомню, что Windows Remote Management это реализация протокола WS-Management Protocol для удаленного управления клиентскими и серверными ОС Windows. WinRM позволяет удаленно управлять компьютерами через:
- Server Manager (Windows Server);
- PowerShell Remoting (PSSession);
- Windows Admin Center.
Как включить WinRM в Windows вручную?
Служба WinRM установлена во всех современных версиях Windows. В Windows Server она включена по умолчанию, и отключена в десктопных редакциях Windows 11/10/8.1). По умолчанию слушатель службы WinRM listener не принимает подключения. Чтобы проверить это, выполните на клиенте команду:
WinRM enumerate winrm/config/listener
Появится ошибка, которая говорит, что служба WinRM не настроена:
WSManFault Message = The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". Error number: -2144108526 0x80338012
Чтобы включить и настроить службу WinRM в Windows, достаточно выполнить команду:
winrm quickconfig
или
Enable-PSRemoting –Force
WinRM has been updated to receive requests. WinRM service type changed successfully. WinRM service started.
Данная команда изменит тип запуска службы WinRM на автоматический, задаст стандартные настройки WinRM и добавить исключения для WinRM портов (5985 и 5986) в список исключений Windows Defender Firewall.
Настройка WinRM с помощью групповых политик
Вы можете автоматически включить и настроить WinRM на компьютерах домена с помощью групповых политик Windows.
- Откройте консоль редактора Group Policy Management Console (gpmc.msc), выберите контейнер с компьютерами на которых вы хотите включить WinRM и создайте новую политику corpEnableWinRM;
- Откройте политику на редактирование;
- Перейдите в раздел Computer Configuration -> Policies -> Windows Settings -> Security Settings -> System Services. Найдите службу Windows Remote Service (WS-Management) и настройте ее на автоматический запуск;
- Теперь перейдите в раздел Computer Policies -> Preferences -> Control Panel Settings -> Services и выберите New -> Service. Укажите имя службы WinRM и на вкладке Recovery задайте действие Restart the Service;
- Перейдите в раздел Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Windows Remote Management (WinRM) -> WinRM Service. Включите параметр Allow remote server management through WinRM. В поле фильтр IPv4/IPv6 можно указать IP адреса или подсети, на которых нужно слушать удаленные подключения через WinRM. Если вы хотите разрешать принимать WinRM подключения на всех IP адресах, оставьте здесь *;
- Откройте в Windows Defender Firewall правила, разрешающие подключаться к WinRM по стандартным портам 5985 и 5986. Перейдите в Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security -> Windows Firewall with Advanced Security -> Inbound Rules. Выберите predefined rule Windows Remote Management;
- Перейдите в раздел Computer Configuration -> Policies -> Windows Components -> Windows Remote Shell и включите параметр Allow Remote Shell Access.
Обновите настройки GPO на клиентах и проверьте, что служба WinRM настроилась автоматически. Для диагностики применения групповой политики на клиенте можно использовать утилиту gpresult.
Проверка настроек WinRM
Чтобы проверить, что настройки WinRM на компьютере заданы через групповые политики, выполните команду:
winrm e winrm/config/listener
Команда выведет текущие настройки WinRM листенера. Обратите внимание на строку
Listener [Source="GPO"]
. Она означает, что настройки получены через групповые политики.
Полную конфигурацию службы WinRM можно вывести с помощью команды:
winrm get winrm/config
Теперь нужно попробовать удаленно подключиться к компьютеру через WinRM. Запустите на удаленном компьютере консоль PowerShell с учетной записью с правами администратора на обоих компьютерах и выполните команду:
Test-WsMan YourCompName1
Если WinRM включен, появится такой ответ:
wsmid : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd ProductVendor : Microsoft Corporation ProductVersion : OS: 0.0.0 SP: 0.0 Stack: 3.0
Проверить доступность порта 5985 на удаленном компьютере можно так:
Test-NetConnection -ComputerName YourCompName1 -Port 5985
Теперь можно попробовать выполнить интерактивное подключение к удаленному компьютеру через PSRemoting с помощью командлета Enter-PSSession:
Enter-PSSession CompNameHere1
В данном случае подключение было успешно установлено и перед вами открылась консоль удаленного сервера.
По аналогии через PSRemoting на удаленном компьютере команду можно выполнить произвольную команду с помощью Invoke-Command:
Invoke-Command -ComputerName YourCompName1 -ScriptBlock {ipconfig /all}
Если соединение работает, вы увидите на экране вывод команды
ipconfig
.
Также можно выполнить команду на удаленном хосте так:
winrs -r:wsk-w10BO1 dir
В некоторых случаях при подключении через PSSession может появится ошибка:
Enter-PSSession : Connecting to remote server wsk-w10BO1 failed with the following error message : Access is denied. CategoryInfo : InvalidArgument: (wsk-w10BO1:String) [Enter-PSSession], PSRemotingTransportException FullyQualifiedErrorId : CreateRemoteRunspaceFailed
В этом случае проверьте настройки разрешения для подключения к WinRM на удаленном компьютере:
Set-PSSessionConfiguration -ShowSecurityDescriptorUI -Name Microsoft.PowerShell
Убедитесь, что ваша учетная запись входит в группу Administrators или Remote Management Users (см. статью об удаленном доступе через WinRM без прав администратора) и им предоставлены права FullControl. Также проверьте, нет ли Deny правил.
Для настройки WinRM и PSRemoting в рабочей группе (без домена AD) рекомендуем использовать эту инструкцию.
Windows Remote Management (WinRM ) is a service that allows the execution of queries and commands remotely from other Windows devices. Just like SSH or Remote Terminal, WinRM is for administrators in a managed domain environment very useful. In this guide, you will learn how to resolve “WSManFault Message 2144108526 0x80338012: Fix the client cannot connect to the destination specified in the request”. Please see how to fix WinRM cannot complete the operation, verify that the specified computer name is valid, and Cannot find the computer: Fix the following error occurred while using Kerberos authentication.
By default, WinRM is enabled on Windows Server, but not enabled on Windows clients. However, an administrator can control the feature by enabling it using Group Policy as well. Here is a guide on Request timed out and Destination Host Unreachable, Transit Failed, General Failure.
Reason for the Error “The client cannot connect to the destination specified in the request”
The following error message clearly states that the WinRM service isn’t running and configured on the client (Windows 11 device).
WSManFault Message = The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
Please see how to configure a remote server (windows) to Support Ansible, and how to fix Failure 5456: Unable to determine destination disk, partition, and/or drive, see BDD Log.
Enable WinRM on Windows Client
The solution for WSManFault Message Number: -2144108526 0x80338012 is to enable WinRM. To enable and configure the WinRM service on Windows, it is enough to run this command below since is not enabled by default on client PCs.
winrm quickconfig
Kindly accept the following changes as shown below by enter the letter “Y”. This will ensure the services are started, enable the WinRM firewall exception etc.
PowerShell Remote Command
Alternatively, you could also use the “Enable-PSRemoting –Force
” command to enable the services. If you wish to read more on PSRemoting. Please see this article: WinRM and PSRemoting: How to configure servers for remote access.
The Enable-PSRemoting cmdlet configures the computer to receive PowerShell remote commands that are sent by using the WS-Management technology.
I hope you found this blog post helpful in resolving this issue “WSManFault Message 2144108526 0x80338012: Fix the client cannot connect to the destination specified in the request”. Please let me know in the comment section if you have any questions.
I have a server where WINRM was running previously and recently stopped. This is a Windows 2008 R2 standard box running IIS (the WinRM IIS module is not installed).
In the System event log:
The WinRM service is unable to start because of a failure during initialization.
Additional Data
The error code is 234.
In the Windows Remote Management Operational event log:
The WinRM service is unable to start because of a failure during initialization. The error code is 14
If I try to run winrim quickconfig:
WinRM is not set up to receive requests on this machine.
The following changes must be made:
Start the WinRM service.
Make these changes [y/n]? y
WinRM has been updated to receive requests.
WinRM service started.
WSManFault
Message = The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination,
most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: «winrm quickconfig».
Error number: -2144108526 0x80338012
The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult
the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: «winrm quickconfig».
I have spent plenty of time reading google links and forum posts for things similar to this but nothing has helped so far and I’m hoping someone on the forum has run across this issue or knows how to reset WINRM to the default config so I can get it started
again.
-
#21
The powershell uses WinRM to communicate with remote machine and WinRM use HTTP/HTTPS. This can be WinRM connection problem with remote machine.
Firstly, check Firewall settings to make sure EMS doesn’t blocked by firewall.
Then, check Winhttp proxy setting if there are any proxy enabled. If that it is, try to add the problematic server to bypass list for test.
To check winhttp proxy setting:
netsh winhttp show proxy
To add bypass list:
netsh winhttp set proxy proxy-server=»xxxxx» bypass-list=»xxxx;Servername»
You can also try to remove proxy temporarily for test:
netsh winhttp reset proxy
-
#22
The powershell uses WinRM to communicate with remote machine and WinRM use HTTP/HTTPS. This can be WinRM connection problem with remote machine.
Firstly, check Firewall settings to make sure EMS doesn’t blocked by firewall.
Then, check Winhttp proxy setting if there are any proxy enabled. If that it is, try to add the problematic server to bypass list for test.
To check winhttp proxy setting:
netsh winhttp show proxy
To add bypass list:
netsh winhttp set proxy proxy-server=»xxxxx» bypass-list=»xxxx;Servername»
You can also try to remove proxy temporarily for test:
netsh winhttp reset proxy
Да, это уже читал и проверял. Нет прокси на нём и фаервола тоже нет.
вот что думаю и вижу: Верно ли?
C:Windowssystem32>winrm quickconfig
Служба WinRM уже настроена на прием запросов на компьютере.
WSManFault
Message = Клиенту не удается подключиться к узлу назначения, указанному в за
просе. Убедитесь, что служба на узле назначения работает и принимает запросы. Оз
накомьтесь с журналами и документацией для определения запущенной на узле назнач
ения службы WS-Management (чаще всего это IIS или WinRM). Если это служба WinRM,
то для анализа состояния и настройки этой службы используйте на удаленном узле
команду «winrm quickconfig».
Код ошибки: -2144108526 0x80338012
Клиенту не удается подключиться к узлу назначения, указанному в запросе. Убедите
сь, что служба на узле назначения работает и принимает запросы. Ознакомьтесь с ж
урналами и документацией для определения запущенной на узле назначения службы WS
-Management (чаще всего это IIS или WinRM). Если это служба WinRM, то для анализ
а состояния и настройки этой службы используйте на удаленном узле команду «winrm
quickconfig».
-
#23
Resolution
To resolve this problem, follow these steps:
- Install the latest Windows Remote Management update. For more information about this update, click the following article number to view the article in the Microsoft Knowledge Base:
981845 The Windows Remote Management service stops responding in Windows 7 or in Windows Server 2008 R2 - Run the following command to restore the listener configuration:
winrm invoke Restore winrm/Config - Run the following command to perform a default configuration of the Windows Remote Management service and its listener:
winrm quickconfig
-
#24
Resolution
To resolve this problem, follow these steps:
- Install the latest Windows Remote Management update. For more information about this update, click the following article number to view the article in the Microsoft Knowledge Base:
981845 The Windows Remote Management service stops responding in Windows 7 or in Windows Server 2008 R2- Run the following command to restore the listener configuration:
winrm invoke Restore winrm/Config- Run the following command to perform a default configuration of the Windows Remote Management service and its listener:
winrm quickconfig
и это уже пробовал
не хочет работать
-
#25
winrs -r:mail.cstroy.local cmd — на себя проглотил, но с других компов не хочет
как то выборочно хавает
c:>winrs -r:mail.cstroy.local cmd
Winrs error:Отказано в доступе.
В логе
System
— Provider
[ Name] Microsoft-Windows-WinRM
[ Guid] {A7975C8F-AC13-49F1-87DA-5A984A4AB417}
EventID 168
Version 0
Level 2
Task 7
Opcode 0
Keywords 0x400000000000000c
— TimeCreated
[ SystemTime] 2020-07-02T14:15:20.978935800Z
EventRecordID 140952751
— Correlation
[ ActivityID] {024ADCF0-F800-0006-9DD4-4F05FB4ED601}
— Execution
[ ProcessID] 764
[ ThreadID] 23684
Channel Microsoft-Windows-WinRM/Operational
Computer MAIL.cstroy.local
— Security
[ UserID] S-1-5-20
EventData
Последнее редактирование: 02.07.2020
-
#26
А что вы сделать то в итоге хотите ? Ящик переместить?
-
#27
А что вы сделать то в итоге хотите ? Ящик переместить?
да,надо завершить процесс миграции ящиков хотя бы, но встряла такая нехорошая ошибка.
.
-
#28
спасибо, что вынесли в отдельную тему.
-
#29
А что вы сделать то в итоге хотите ? Ящик переместить?
именно так.
Она вытекла из замечательной темы миграции 2010-2016
-
#30
Если с десятки выполнить (exchange shell запустите от имени админа) Что будет ? Это перемещение всех ящиков в базу назначения..
Код:
Get-Mailbox -server server2010 | New-MoveRequest -TargetDatabase "Destination DB"
-
#31
даже наверное с 2016 лучше
-
#32
Вы пробовали выполнять миграцию ящика из вот этой оснастки ??
-
#33
Test-ServiceHealth с 2010 exchange. Служба winRM похоже не алё
-
#34
Если с десятки выполнить (exchange shell запустите от имени админа) Что будет ? Это перемещение всех ящиков в базу назначения..
Код:
Get-Mailbox -server server2010 | New-MoveRequest -TargetDatabase "Destination DB"
я консоль из-под админа и выполнил
-
#35
Test-ServiceHealth с 2010 exchange. Служба winRM похоже не алё
об этом и речь.
оно пишет Отказано в доступе. Как сейчас выяснил.
-
#36
Вы пробовали выполнять миграцию ящика из вот этой оснастки ??
Посмотреть вложение 10721
с неё ошибку и увидел с самого начала. Раскопки вылелись в это всё.
-
#37
Test-ServiceHealth с 2010 exchange. Служба winRM похоже не алё
открываю консоль на 2010, она не может к 2010 подключиться и подключается к 2016 сразу.
-
#38
Error:
Microsoft.Exchange.Data.Storage.ConnectionFailedTransientException: Не удается открыть почтовый ящик /o=CSTROY/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=MAIL/cn=Microsoft System Attendant. —> Microsoft.Mapi.MapiExceptionNetworkError: MapiExceptionNetworkError: Unable to make connection to the server. (hr=0x80004005, ec=2423)
Следы ведут в DNS
-
#39
а какие у вас имена старого и нового exch? DNS в свойствах сетевых адаптеров верные ? Они должны указывать на контролеры домена как я понимаю, если у вас DNS на них же живет…
-
#40
Описание служб и ролей Exchange + общие сведения
Проверка путей автодискавер
Get-ClientAccessService | fl Name,*URI*
Проверка Test-ComputerSecureChannel, если возвращает true значит ок (это проверка того что учетка компа exchange имеет доверенные отношения с AD, если будет false то делать reset account)
Последнее редактирование: 02.07.2020
- Remove From My Forums
-
Question
-
First, I’ve found a workaround (config directly in the registry), so this is not urgent.
Second, I think this specifically relates using WinRM with WinHTTP when WinHTTP has addresses on the IP listen list. We have some similarly configured boxes with nothing on the IP listen list — they don’t have this problem.
My question is: what am I doing wrong? I suspect there’s something peculiar in our environment. I’ve done a fair amount of googling on this and haven’t yet managed to find anyone with an identical problem. Or a solution to mine (who knows, I’ve probably cruised right past it several times now). Which is why I’m posting this.
Symptoms:
- Summary: error code 0x80338012, 2150858770 or -2144108526 when trying to use the winrm command line or powershell wsman driver — even after I’m able to create and use remote sessions hosted on the machines in question
- Detailed error output — note that every winrm command I’ve tried gives this error, not just winrm quickconfig
output from winrm quickconfig winrm.cmd : WSManFault + CategoryInfo : NotSpecified: (WSManFault:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Message = The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". Error number: -2144108526 0x80338012The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
output from Set-WSManQuickConfig or Enable-PSRemoting WinRM already is set up to receive requests on this machine. <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150858770" Machine="xxx.yyy.com"> <f:Message>The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". </f:Message></f:WSManFault>
output from dir WSMan:localhost (in PowerShell) The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
Workaround:
- Summary: directly configure a listener in the registry at HKLMSOFTWAREMicrosoftWindowsCurrentVersionWSMAN
- Details:
- make sure the host’s main address is in the IP listen list (httpcfg set iplisten -i nn.nn.nn.nn — I rebooted after this, but net stop http/net start http might have worked)
- at HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionWSMANListener, add a subkey with a name like IP:nn.nn.nn.nn +HTTP
- under this key, add two values:
- one DWORD with name=Port data=0x1761,
- one SZ with name=uriprefix, data=wsman
- restart the remote management service (service name: WinRM, description: Windows Remote Management (WS-Management))
- Drawbacks:
- the winrm command line and powershell wsman drive are still broken
- it only listens to the addresses in the IP listen list and always listens to all of them:
- using IP:nn.nn.nn.nn +HTTP as the WSMANListener subkey has the same effect as using *+HTTP
- I also tried adding value name=hostname data=nn.nn.nn.nn (stab in the dark). No effect.
- adding WSMANServer value name=IPv4Filter value=nn.nn.nn.nn causes it to listen on NO addresses (I may have fat-fingered something here, but I tried it twice with the same effect)
-
Edited by
Wednesday, January 13, 2010 6:52 PM
spacing, yet again
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_MACHINESYSTEMCurrentControlSetservicesWinRM ).
После применения групповой политики, данной системой можно управлять удаленно с помощью команд 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_MACHINESYSTEMCurrentControlSetservicesWinRM ).
Теперь, после активации WinRM с помощью групповой политики, данной системой можно управлять удаленно с помощью команд WinRS. Следующая команда откроет командную строку, запущенную на удаленной системе:
После появления окна командной строки вы можете выполнять и видеть результат выполнения любых команд на удаленном компьютере, как будто бы вы работаете за ним локально. Отметим, что на вашем управляющем компьютере WinRM также должна быть активирована.
Источник
Служба удаленного управления windows winrm не выполняется
Вопрос
Перешел на Windows 10.
Пару дней все работало нормально, сегодня при попытке создать новую сессию к exchange серверу через powershell стандартной командой New-PSSession получил следующее:
New-PSSession : [localhost] Сбой подключения к удаленному серверу localhost. Сообщение об ошибке: Клиенту не удается подключиться к узлу назначения, указанному в запросе. Убедитесь, что служба на узле назначения работает и принимает запросы. Ознакомьтесь с журналами и документацией для определения запущенной на узле назначения службы WS-Management (чаще в
сего это IIS или WinRM). Если это служба WinRM, то для анализа состояния и настройки этой службы используйте на удаленном узле команду «winrm quickconfig». Подробности см. в разделе справки «about_Remote_Troubleshooting».
строка:1 знак:1
+ New-PSSession
+
+ CategoryInfo : OpenError: (System.Manageme. RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : CannotConnect,PSSessionOpenFailed
И при запуске winrm quickconfig
PS C:Windowssystem32> winrm quickconfig
Служба WinRM уже выполняется на этом компьютере.
WSManFault
Message = Клиенту WinRM не удается обработать запрос. Зашифрованное тело сообщения имеет неверный формат и не может
быть расшифровано. Убедитесь в том, что служба шифрует тело сообщения в соответствии со спецификациями.
Код ошибки: -2144108295 0x803380F9
Клиенту WinRM не удается обработать запрос. Зашифрованное тело сообщения имеет неверный формат и не может быть расшифровано. Убедитесь в том, что служба шифрует тело сообщения в соответствии со спецификациями.
Источник
В этой статье мы рассмотрим, как централизованно включить и настроить службу удаленного управления Windows Remote Management (WinRM) на компьютерах домена с помощью групповых политик. Напомню, что Windows Remote Management это реализация протокола WS-Management Protocol для удаленного управления клиентскими и серверными ОС Windows. WinRM позволяет удаленно управлять компьютерами через:
- Server Manager (Windows Server);
- PowerShell Remoting (PSSession);
- Windows Admin Center.
Как включить WinRM в Windows вручную?
Служба WinRM установлена во всех современных версиях Windows. В Windows Server она включена по умолчанию, и отключена в десктопных редакциях Windows 11/10/8.1). По умолчанию слушатель службы WinRM listener не принимает подключения. Чтобы проверить это, выполните на клиенте команду:
WinRM enumerate winrm/config/listener
Появится ошибка, которая говорит, что служба WinRM не настроена:
WSManFault Message = The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". Error number: -2144108526 0x80338012
Чтобы включить и настроить службу WinRM в Windows, достаточно выполнить команду:
winrm quickconfig
или
Enable-PSRemoting –Force
WinRM has been updated to receive requests. WinRM service type changed successfully. WinRM service started.
Данная команда изменит тип запуска службы WinRM на автоматический, задаст стандартные настройки WinRM и добавить исключения для WinRM портов (5985 и 5986) в список исключений Windows Defender Firewall.
Настройка WinRM с помощью групповых политик
Вы можете автоматически включить и настроить WinRM на компьютерах домена с помощью групповых политик Windows.
- Откройте консоль редактора Group Policy Management Console (gpmc.msc), выберите контейнер с компьютерами на которых вы хотите включить WinRM и создайте новую политику corpEnableWinRM;
- Откройте политику на редактирование;
- Перейдите в раздел Computer Configuration -> Policies -> Windows Settings -> Security Settings -> System Services. Найдите службу Windows Remote Service (WS-Management) и настройте ее на автоматический запуск;
- Теперь перейдите в раздел Computer Policies -> Preferences -> Control Panel Settings -> Services и выберите New -> Service. Укажите имя службы WinRM и на вкладке Recovery задайте действие Restart the Service;
- Перейдите в раздел Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Windows Remote Management (WinRM) -> WinRM Service. Включите параметр Allow remote server management through WinRM. В поле фильтр IPv4/IPv6 можно указать IP адреса или подсети, на которых нужно слушать удаленные подключения через WinRM. Если вы хотите разрешать принимать WinRM подключения на всех IP адресах, оставьте здесь *;
- Откройте в Windows Defender Firewall правила, разрешающие подключаться к WinRM по стандартным портам 5985 и 5986. Перейдите в Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security -> Windows Firewall with Advanced Security -> Inbound Rules. Выберите predefined rule Windows Remote Management;
- Перейдите в раздел Computer Configuration -> Policies -> Windows Components -> Windows Remote Shell и включите параметр Allow Remote Shell Access.
Обновите настройки GPO на клиентах и проверьте, что служба WinRM настроилась автоматически. Для диагностики применения групповой политики на клиенте можно использовать утилиту gpresult.
Проверка настроек WinRM
Чтобы проверить, что настройки WinRM на компьютере заданы через групповые политики, выполните команду:
winrm e winrm/config/listener
Команда выведет текущие настройки WinRM листенера. Обратите внимание на строку
Listener [Source="GPO"]
. Она означает, что настройки получены через групповые политики.
Полную конфигурацию службы WinRM можно вывести с помощью команды:
winrm get winrm/config
Теперь нужно попробовать удаленно подключиться к компьютеру через WinRM. Запустите на удаленном компьютере консоль PowerShell с учетной записью с правами администратора на обоих компьютерах и выполните команду:
Test-WsMan YourCompName1
Если WinRM включен, появится такой ответ:
wsmid : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd ProductVendor : Microsoft Corporation ProductVersion : OS: 0.0.0 SP: 0.0 Stack: 3.0
Проверить доступность порта 5985 на удаленном компьютере можно так:
Test-NetConnection -ComputerName YourCompName1 -Port 5985
Теперь можно попробовать выполнить интерактивное подключение к удаленному компьютеру через PSRemoting с помощью командлета Enter-PSSession:
Enter-PSSession CompNameHere1
В данном случае подключение было успешно установлено и перед вами открылась консоль удаленного сервера.
По аналогии через PSRemoting на удаленном компьютере команду можно выполнить произвольную команду с помощью Invoke-Command:
Invoke-Command -ComputerName YourCompName1 -ScriptBlock {ipconfig /all}
Если соединение работает, вы увидите на экране вывод команды
ipconfig
.
Также можно выполнить команду на удаленном хосте так:
winrs -r:wsk-w10BO1 dir
В некоторых случаях при подключении через PSSession может появится ошибка:
Enter-PSSession : Connecting to remote server wsk-w10BO1 failed with the following error message : Access is denied. CategoryInfo : InvalidArgument: (wsk-w10BO1:String) [Enter-PSSession], PSRemotingTransportException FullyQualifiedErrorId : CreateRemoteRunspaceFailed
В этом случае проверьте настройки разрешения для подключения к WinRM на удаленном компьютере:
Set-PSSessionConfiguration -ShowSecurityDescriptorUI -Name Microsoft.PowerShell
Убедитесь, что ваша учетная запись входит в группу Administrators или Remote Management Users (см. статью об удаленном доступе через WinRM без прав администратора) и им предоставлены права FullControl. Также проверьте, нет ли Deny правил.
Для настройки WinRM и PSRemoting в рабочей группе (без домена AD) рекомендуем использовать эту инструкцию.
- Remove From My Forums
-
Question
-
First, I’ve found a workaround (config directly in the registry), so this is not urgent.
Second, I think this specifically relates using WinRM with WinHTTP when WinHTTP has addresses on the IP listen list. We have some similarly configured boxes with nothing on the IP listen list — they don’t have this problem.
My question is: what am I doing wrong? I suspect there’s something peculiar in our environment. I’ve done a fair amount of googling on this and haven’t yet managed to find anyone with an identical problem. Or a solution to mine (who knows, I’ve probably cruised right past it several times now). Which is why I’m posting this.
Symptoms:
- Summary: error code 0x80338012, 2150858770 or -2144108526 when trying to use the winrm command line or powershell wsman driver — even after I’m able to create and use remote sessions hosted on the machines in question
- Detailed error output — note that every winrm command I’ve tried gives this error, not just winrm quickconfig
output from winrm quickconfig winrm.cmd : WSManFault + CategoryInfo : NotSpecified: (WSManFault:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Message = The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". Error number: -2144108526 0x80338012The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
output from Set-WSManQuickConfig or Enable-PSRemoting WinRM already is set up to receive requests on this machine. <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150858770" Machine="xxx.yyy.com"> <f:Message>The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". </f:Message></f:WSManFault>
output from dir WSMan:localhost (in PowerShell) The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
Workaround:
- Summary: directly configure a listener in the registry at HKLMSOFTWAREMicrosoftWindowsCurrentVersionWSMAN
- Details:
- make sure the host’s main address is in the IP listen list (httpcfg set iplisten -i nn.nn.nn.nn — I rebooted after this, but net stop http/net start http might have worked)
- at HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionWSMANListener, add a subkey with a name like IP:nn.nn.nn.nn +HTTP
- under this key, add two values:
- one DWORD with name=Port data=0x1761,
- one SZ with name=uriprefix, data=wsman
- restart the remote management service (service name: WinRM, description: Windows Remote Management (WS-Management))
- Drawbacks:
- the winrm command line and powershell wsman drive are still broken
- it only listens to the addresses in the IP listen list and always listens to all of them:
- using IP:nn.nn.nn.nn +HTTP as the WSMANListener subkey has the same effect as using *+HTTP
- I also tried adding value name=hostname data=nn.nn.nn.nn (stab in the dark). No effect.
- adding WSMANServer value name=IPv4Filter value=nn.nn.nn.nn causes it to listen on NO addresses (I may have fat-fingered something here, but I tried it twice with the same effect)
-
Edited by
Wednesday, January 13, 2010 6:52 PM
spacing, yet again
Прочитано:
9 808
Я опишу процесс, каким образом можно централизованно активировать и настроить службу 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_MACHINESYSTEMCurrentControlSetservicesWinRM ).
После применения групповой политики, данной системой можно управлять удаленно с помощью команд WinRS. Следующая команда откроет командную строку, запущенную на удаленной системе:
winrs –r:<имя_компьютера> cmd
После появления окна командной строки вы можете выполнять и видеть результат выполнения любых команд на удаленном компьютере, как будто бы вы работаете за ним локально. Отметим, что на вашем управляющем компьютере WinRM также должна быть активирована.
В моем случаем тестовая машина называется alektest4
winrs -r:alektest4 cmd
В этой статье, я попытаюсь рассказать, каким образом можно централизованно активировать и настроить службу Windows Remote Management (WinRM) на всех целевых компьютерах с помощью групповой политики. Напомню, что Windows Remote Management – это специальный сервис, позволяющий администраторам получить возможность удаленного доступа и управления клиентскими и серверными ОС Windows (и, думаю, если вы ранее пользовались набором утилит Microsoft Sysinternals PSTools, то WRM должен вам понравиться).
Возьмем обычный ПК с 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 0x80338012
Если нужно настроить WinRM вручную на отдельной системе, достаточно набрать команду:
winrm quickconfig
В том случае, если нужно настроить 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 enumerate winrm/config/listener
Удостоверимся, что тип запуска службы WinRM задан в автоматический . Хотя по факту тип запуска «автоматический с задержкой», т.к. по умолчанию для службы WinRM задана задержка запуска (параметр DelayedAutoStart=1 в ветке HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesWinRM ).
Теперь, после активации WinRM с помощью групповой политики, данной системой можно управлять удаленно с помощью команд WinRS. Следующая команда откроет командную строку, запущенную на удаленной системе:
winrs –r:computer01 cmd
После появления окна командной строки вы можете выполнять и видеть результат выполнения любых команд на удаленном компьютере, как будто бы вы работаете за ним локально. Отметим, что на вашем управляющем компьютере WinRM также должна быть активирована.
Join @AdmNtsRu on Telegram