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. In this article, we shall be discussing WinRM and PSRemoting: How to configure servers for remote access. Here are some interesting guides: How to request a certificate signing request in Windows using Microsoft Management Console, how to troubleshoot and fix Windows Admin Center that cannot be reached, and how to Test Network Connection to the Windows Admin Center (WAC) Gateway.

WinRM is enabled by default on all Windows Server operating systems since Windows Server 2012 and above, but disabled on all client operating systems like Windows 10 etc.

On the Windows server, you do not have anything to do to have this service enabled. To configure your servers for remote access, follow the steps below. Here is the syntax to use: Enable -PSReomoting. Here are some interesting articles: How to enable or disable WinRM via the command-line, and how to configure a remote server (windows) to Support Ansible.

Configure your servers for remote access

Launch your server, fire up a PowerShell terminal, and type “Enable-PSRemoting”.

This enables the server for PSRemoting and allows the server to be accessed via remote access.

Add the servers to the TrustedHosts list

Add the host to the TrustedHosts list with the command, for more information, see the following guide on How to add servers to the Trusted Hosts list.

RestartWinRM service with the command below via PowerShell.

Restart-Service winrm

To test the WinRM Configuration, run the command below.

winrm quickconfig

Please see how to fix “WinRM cannot complete the operation, verify that the specified computer name is valid“, and how to fix “Cannot find the computer: Fix the following error occurred while using Kerberos authentication“.

Method 1

To test remote access using PowerShell Remoting, use the command below, replace “ansible” with your remote computer

Enter-PSSession -ComputerName Ansibleserver

Method 2

To permit a remote connection via PowerShell remoting, use the command below

Enter-PSSession -ComputerName TechDArchive -Credential $Credentials

As shown below, the authentication is successful and I can remotely manage the machine via PowerShell Remoting.

I hope you found this blog post helpful on WinRM and PSRemoting: How to configure servers for remote access. If you have any questions, please let me know in the comment session.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x