Не удается подключиться к серверу с помощью удаленного взаимодействия windows powershell

Добрый вечер, уже 4ый день, безрезультатно, пытаюсь развернуть сервер терминалов на базе windows server 2012 standart.

Сервис разворачивается под доменным администратором, (включен в домен). При проверки совместимости выдает ошибку «Не удалось подключиться с помощью удаленного взаимодействия Windows PowerShell»

С удаленных хостов легко подключаюсь к серверу с помощью New-PSSession, Enter-PSSerssion. Включение winrm контролирует групповая политика (успешно отрабатывает). На самом хосте запускал «Enable-PSRemoting» и WinRM qc»

В Журналы получаю предупреждение от Windows-Remote-Management с кодом 10149:

Служба WinRM не прослушивает запросы WS-Management. 

Действие пользователя  Если служба не была остановлена специально,

проверьте конфигурацию WinRM с помощью следующей команды:  winrm enumerate winrm/config/listener

Вывод winrm enumerate winrm/config/listener:

Listener [Source="GPO"]
    Address = *
    Transport = HTTP
    Port = 5985
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 192.168.1.1

IP адрес: 192.168.1.1 — localhost

Пройдусь по другим условиям выдаваемым «проверкой совместимости»:

— сервер должен быть доступен через Windows PowerShell ДА (ИМХО)

— Сервер должен быть присоединен к домену ДА

Сервер должен работать под управлением Windows server 2012
ДА

— Текущий пользователь должен входить в группу локальных администраторов сервера
ДА (доменный администратор)

— Подключения служб удаленных рабочих столов должны быть разрешены с помощью групповой политики
ДА (политика отрабатывает)

Заранее благодарю за помощь, Константин.

И да главный вопрос, все это делается именно на 2012ом сервере только потому что вычитал в технетовских блогах что rdweb работает со сторонними браузерами отличными от IE. Это правда?


https://twitter.com/#!/d1ms0n

  • Изменено

    19 февраля 2013 г. 20:16

Skip to content

Scenario

You are trying install RDS 2012 R2 (no matter quick or standard mode) and get error during compatibility check:

Unable to connect to the server by using Windows PowerShell remoting.

rds compatibility error

  • Server is joined to domain
  • Server is running on 2012 R2 up-to-date
  • Current user is a member of  group “Administrators”  (lusrmgr.msc  -> groups)
  • PowerShell is configured to receive remote queries (Enable-PSRemoting)
  • Remote Desktop Services are not forbidden in GPOs (default policies)
  • Remote management is enabled in Server Manager (servermanager -> local server -> remote management)
  • Firewall rules for remote management are enabled (Get-NetFirewallRule *winmgmt*|select name,enabled)
  • There are no network and time synchronization issues between this server and my environment

Solution

If you ping server you may notice IPv6 name format (in my case). Windows Server management consoles don’t like it in my case (any thoughts/comments?). So turn off IPv6 (if you are not using it) on your network adapter. I think unchecked “register this connection in the DNS”, ipconfig /flushdns work too. But did no try.

I had a lot of VDI deployments but faced with this problem for the first time.

Note:  same issue was with Active Directory mmc. There was the wrong status of Domain Controller in “change domain controller..” (was Offline). Turning IPv6 ON resolved this behavior. Agruments against disabling IPv6

Image: post content

I am trying to install Terminal Services on a Server that I inherited. I keep getting the above error. Doesn’t matter if I use the GUI or powershell directly.

I have found dozens of suggested fixes on google, non of them are working in my case.  I suspect the person who setup this server disabled or modified something that is being used as part of the powershell remoting.  I have discovered other things that were modified on this server such as the RDP port.  Unfortunately I cannot just wipe and re-install the server due to it being remote and due to the 3rd party software that is installed on the server.  I wish I could as that would have been the faster route 10 times over already.

Situation: When attempting to add licensing server in Windows 2012 R2 RS service, you may get this message: Unable to connect to the server by using Windows Powershell Remoting.

Troubleshooting:

We fix the problem. It is Environment Variables. Search online, we find some people have the similar case. Changing the path from %systemroot% to c:\windows and that fixed the problem.

In our case, chaging from PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Millennium 3;C:\Program Files (x86)\Microsoft Office\Office16;C:\Bat;

to
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Millennium 3;C:\Program Files (x86)\Microsoft Office\Office16;C:\Bat;

Note: without PATH= fixes the problem.

Other troubleshooting:

1. Disable IPv6 for a test.

2. Run Powershell, run this command: Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1000

Then restart the server.

In a PS Shell

3. It could be the firewall issue. disable the Windows firewall or add ‘Windows Remote Management’ rule to my firewall.

4. clearing the proxy by running this command: netsh winhttp reset proxy

5. Compatibility problem when installing Remote desktop services role on 2012 “Unable to connect to the server by using Windows Powershell Remoting”

6. “Enable-PSRemoting -force” worked for me.

7. Solved the issue – DC and RDS server had 3 hour time difference.  Syncing time worked.

8. If you want to add TS licensing service, add Server role. If you want to add this server under RDS licensing server to receive the RD CALs, go to Deployment.

9. had same issue fixed it by clearing the proxy

netsh winhttp reset proxy

worked for me

10. Domain admin can’t seem to do anything so added another admin account (with local admin rights) then running the RDS Deployment from an elevated Server Manager session did the trick for me.

11. The solution was to increase the MaxFieldLength and MaxRequestBytes keys in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters

If the keys does not exists you can create them, be sure to use the DWORD type.

I sat MaxFieldLength to DEC value 40000 and MaxRequestBytes to DEC value 32768 and rebooted the server. Problem solved.

12. Solved the issue – DC and RDS server had 3 hour time difference.  Syncing time worked.

13. My systems engineer found that my issue was caused by a System variable that was set incorrectly. The Path variable had been cleared, which was keeping Powershell Remoting from working correctly. He copied the variables from another server, and it is nowworking correctly.

14. If there is a GPO setting on the network that affects the server you are trying to install RDS on and that GPO controls WinRM listening ports and is incorrectly configured then you will get this error.

Run winrm enumerate winrm/config/listener on the target server and if ListeningOn = null is returned then check GPO on this box with gpresult /h result.html & result.html. Search this GPO output for Windows Components/Windows RemoteManagement (WinRM)/WinRM Service and IPv4 Filter and IPv6 Filter need to contain * or an IP range that includes this server. If the value is blank or wrong IP range then you will get the original posters error message!

15. In Server Manager/Remote Management was already enabled. My fix was to disable and then re-enable Remote Management. I was then able to reinstall RDS.

16. use “net time /domain:*** /set” and problem fixed.

Bob Lin

Bob Lin, Chicagotech-MVP, MCSE & CNE
Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on
http://www.ChicagoTech.net
How to Install and Configure Windows, VMware, Virtualization and Cisco on
http://www.HowToNetworking.com
View all posts by Bob Lin

Ответы с готовыми решениями:

Общие папки в Диспетчере серверов Windows 2012, расшаренные на Server 2008
Добрый день!
Имееются в домене 2 КД: Server 2012 и Server 2008, на котором лежат общие ресурсы. …

UEFI-установка Windows Server 2012 с флешки
Добрый день!
Создал загрузочную флешку с оригинальным win server 2012 r2 standart x64….

Установка Windows Server 2012 на программный raid 1
Возможно сделать так чтобы системный диск с Windows Server 2012 находился на программном raid 1? В…

Установка Windows Server 2012 R2 с загрузочной UEFI-флешки
1. разбил утилитой диски на 2 рейд-массива. 2 диска raid1, 5 дисков- raid5. выставил режим…

  • Не удается подключиться к принтеру по сети windows 10 0x0000011b
  • Не удается подключиться к принтеру 0000011b windows 10
  • Не удается подключиться к магазину windows phone
  • Не удается подключиться к выбранной сети windows xp
  • Не удается подключиться к беспроводному дисплею windows 11