Unable to connect to the server by using windows powershell remoting

For troubleshooting purpose, try Turning Off the Windows Firewall  both in the source and destination then test again. I had very similar issue and i got it resolved, turns out there are more services that needs to be allowed on the firewall to make it work.

RRS feed

  • Remove From My Forums
  • Question

All replies

  • For troubleshooting purpose, try Turning Off the Windows Firewall  both in the source and destination then test again. I had very similar issue and i got it resolved, turns out there are more services that needs to be allowed on the firewall to make
    it work.

    • Edited by

      Thursday, July 20, 2017 8:35 AM
      modify

  • Hi Geraldine,

    I did that , turn of the firewall but no luck.


    Thanks, Sajjan T

  • Hi,

    Please navigate to Server Manager -> Local Server, ensure that Remote management is enabled.

    If the issue persists, try to ping RDS servers via FQDN/NetBIOS, if IPv6 address returns, please disable IPv6 to see whether it works.

    In addition, similar issues were resolved by remove proxy server for some forum community members via command
    netsh winhttp reset proxy.

    Best Regards,

    Amy


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

    • Proposed as answer by
      Masoun Brayez
      Monday, July 22, 2019 11:54 AM

  • it work, your answer most help full.

  • Hi,

    Kindly let me what you exactly did to fix the above issue.

    Thanks.


    Thanks, Sajjan T

  • Same error here, but I «fixed» it this way:

    I reinstalled Windows 2016 and only configured a vmxnet 3 interface by installing VMWare Tools and giving it an IPv4 address, nothing else. Rebooted. The RDS installation wizard passes the compatibility check. I didn’t install the RDS services and just renamed
    the host to what I want it to be. Restarted. The RDS installation wizard does NOT pass compatibility check anymore: «Unable to connect to the server by using Windows Powershell Remoting». Seems to be a problem there.

    I couldn’t find at which point the system uses the wrong hostname, maybe only server manager does.

    EDIT:

    In my case the problem is not the hostname, it’s the custom «Primary DNS suffix of this computer» I edited in Control Panel/System/Computer name, domain, and workgroup settings. I left the suffix blank, now it works even with the custom hostname.

    • Edited by
      kj765H-u
      Friday, February 23, 2018 2:16 PM

  • Hi,

    I had the same problem. After a lot of search in the internet, try and error I found the solution (for me):

    Just disable IPv6 and everything works well…!

    Hope this will help someone else. :)

    Alex

    • Proposed as answer by
      slacknerd
      Sunday, June 2, 2019 2:58 PM

  • EDIT:

    In my case the problem is not the hostname, it’s the custom «Primary DNS suffix of this computer» I edited in Control Panel/System/Computer name, domain, and workgroup settings. I left the suffix blank, now it works even with the custom hostname.

    Yep, this worked for me, thanks

  • run gpedit.msc

    go to Local Computer Policy > Administrative Template > Windows Components > Windows Remote Shell

    In Settings change «Allow Remote Shell Access» as Enabled and viola

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

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:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)Millennium 3;C:Program Files (x86)Microsoft OfficeOffice16;C:Bat;

to
C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)Millennium 3;C:Program Files (x86)Microsoft OfficeOffice16;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:localhostShellMaxMemoryPerShellMB 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_MACHINESYSTEMCurrentControlSetservicesHTTPParameters

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

For learning only, with my Windows Server 2012 R2, I would like to set up RemoteApp.

I don’t find any help on the web about this error message:

unable to connect to the server by using windows powershell remoting

or in French:

la communication à distance windows powershell ne permet pas la connexion avec le serveur

I tried to to run Server Manager with admins rights, but that didn’t help.

  • What is required to set up this?

  • Can you tell me why I get this error message?

StackzOfZtuff's user avatar

asked Feb 9, 2015 at 11:21

locobastos's user avatar

2

Enable Allow Remote Access in My computer properties or server manger > local server >

this will solve your issue

answered Jan 9, 2019 at 13:32

Manoj Malviya's user avatar

Voiced by Amazon Polly

When starting an RDS farm install today I was presented with an error saying that the server could not be connected to via WinRM, which was odd as the server giving the error was the machine I was running the install from. A screenshot of the error is below;

rds_install_winrm_error

I did a little Googling of the problem and found a number of posts reporting this was related to IPv6 and that the fix or workaround was to disable IPv6. In my eyes this isn’t a workaround, Microsoft do advise against disabling IPv6. So, after a little more thinking about this, I wondered how the WinRM listeners were configured, and in particular the IPv6 listeners. Surprise, surprise, the IPv4 listeners were configured, but the IPv6 listeners simply were empty in Group Policy. An empty listener address range in policy means those listeners are disabled. Configuring these correctly in the policy and restarting the server then allowed the RDS installation to proceed.

Microsoft do give some detail on how to configure this setting and I just thought I’d share, as disabling IPv6 shouldn’t really be a fix for anything.

Hi Guys and Girls,

I’m quite stuck here, and hopefully you can come up with some nice ideas on this matter. I’ve got a VM deployed in MS Azure (Type: D2_V2) and I’d like to deploy Remote Desktop Services onto it.

All 3 components — Connection Broker, Session Host, Web access would be the very same server as it would be enough for us.

When I try to run the deployment from the server manager, it gives the well known «Unable to connect to the server by using Windows
Powershell Remoting» 
after selecting the connection broker server.

To make things easier, let me sum up what I have done already:

-No proxy is in place

-The server is in a domain

-I am added as a member of the local Administrator group

-Enable-PSRemoting -Force

-Set-Item WSMan:localhostShellMaxMemoryPerShellMB 1000

-Creating firewall rules in group policy to enable connection

-Listener is in place

-Allow remote server management through WinRM is enabled in group policy

-Turning off IPv6 did not help

-Even psremoting is working: I can enter a psremote session from another pc on the network aiming the server — but when I run «New-SessionDeployment -ConnectionBroker servername.domain …..» I receive the same «Unable
to connect to the server by using Windows Powershell Remoting» error

I’ve restarted the server after each settings adjustment of course.

I really am a bit clueless here on what else can I try to do. Any idea is welcome.

04
Wednesday
Feb 2015

When you try to install RDS role on server 2012 R2 using standard deployment, this issue may occur (Figure 1).
“Unable to connect to the server by using Windows PowerShell remoting”.

Figure 1

Figure 1: Unable to connect to the server by using Windows PowerShell remoting
First of all, we need to verify the configurations as it suggested:
1. The server must be available by using Windows PowerShell remotely.
2. The server must be joined to a domain.
3. The server must be running at least Windows Server 2012 R2.
4. The currently logged on user must be a member of the local Administrators group on the server.
5. Remote Desktop Services connections must be enabled by using Group Policy.
In addition, we need to check if the “Windows Remote Management “service is running and related firewall exceptions have been created for WinRM listener.
To enabling PowerShell remoting, we can run this PowerShell command as administrator (Figure 2).
Enable-PSRemoting -Force

Figure 2

Figure 2: Enable PowerShell Remoting
However, if issue persists, we need to check whether it has enough memory to work.
By default, remote shell allots only 150 MB of memory. If we have IIS or SharePoint App pool, 150 MB of memory is not sufficient to perform the remoting task. Therefore, we need to increase the memory via the PowerShell command below:
Set-Item WSMan:localhostShellMaxMemoryPerShellMB 1000
Then, you need to restart the server and the issue should be resolved.

Posted by on December 10, 2012

I tried to install an RDS on one of my 2012 servers.

Installed Session host and WEB server for Remote Apps using Sever manager-Add Role-RDS (that was a bad idea;  you need to use a separate Wizard from “Add Roles and Features Wizard”, not just add RDS role)

image 

After that I figured out I do not have management tools for RDS Smile

So I started the required Wizard. It tried to install Broker and failed with the above mentioned error.

I double checked I have Enable-PSRemoting ran. Still the same error.

I found a thread discussing the issue (http://social.technet.microsoft.com/Forums/en-US/winserver8setup/thread/bbb7427b-f839-48c4-b49c-467138f94b16) one of posts (not marked as an answer) says:

After working for weeks with M$ Support level 2 and higher on this issue below is the fix and reason for the issue.

In a PS Shell

Set-Item WSMan:localhostShellMaxMemoryPerShellMB 1000

then reboot

The default remote shell is allotted 150MB of memory. If we have Sharepoint/IIS App pool on the server then this memory is not sufficient to create a remote session (This is used mostly while installing any roles on windows server 2012) . Therefore by running that command we have enabled the remote shell to use 1000mb which will  provide more memory  to windows powershell to make remote sessions and resolve the issue.

I tried that and still got the error (but maybe it was a part of resolution).

After that I thought about my environment – I have two forests with two-way trust between them and I use my “management forest account” which is domain admin in the “demo” forest where I am installing the RDS. I decided to use an account from the “demo” forest instead and successfully installed RDS at this time.

Resolution:

Use admin account from the same forest were I installed RDS. Foreign forest account did not work regardless two–way trusts and admin permissions in the target domain.

Понравилась статья? Поделить с друзьями:
  • Unable to configure windows to trust the fiddler root certificate
  • Ummy youtube video downloader для windows скачать
  • Ummy video downloader скачать бесплатно на русском для windows 10
  • Ummy video downloader аналоги для windows
  • Ummy video downloader windows 10 официальный сайт