Contact Info

Crumbtrail

ActiveXperts.com » Support » Serial Port Component » KB Article

Knowledge Base FAQ Item #7260040

 

Q7260040: How do I enable WinRM on a standalone server?

There are two ways to enable WinRM on a standalone server:

  • Using the WinRM quick configuration tool
  • Using the Local Group Policy Editor (GPEDIT.MSC)

 

Enable WinRM using the WinRM quick configuration tool

To enable WinRM on a standalone Windows Server:

  1. Open an elevated Command Prompt.
  2. Type the following command to enable WinRM: winrm quickconfig
  3. Type y when prompted to confirm that you want to enable WinRM.
  4. Type the following command to allow remote access to the WinRM service:
    winrm set winrm/config/service '@{AllowUnencrypted="true"}'
  5. Type the following command to allow remote access to the WinRM listener:
    winrm set winrm/config/listener '@{Hostname="<computer_name>";Port="<port>"}'

    Replace <computer_name> with the hostname of the server and <port> with the desired port number (default is 5985).
  6. Type the following command to add the current user to the WinRM Remote Management Users group:
    winrm set winrm/config/winrs '@{MaxShellsPerUser="<number>"}'

    Replace <number> with the desired number of concurrent connections.
  7. Restart the WinRM service by running the following command:
    net stop winrm' and 'net start winrm

 

Enable WinRM using the Local Group Policy Editor (GPEDIT.MSC )

  • Open the "Local Group Policy Editor" by typing "gpedit.msc" in the "Run" dialog box or in the search bar on the Start menu.
  • In the left pane of the Local Group Policy Editor, navigate to "Computer Configuration" > "Administrative Templates" > "Windows Components" > "Windows Remote Management (WinRM) -> WinRM Service".
  • In the right pane, double-click on the "Allow remote server management through WinRM" policy. To allow WinRM from any machine, select '*' as your IPv4 and IPv6 filters
  • Allow the authentication protocols, depending on your needs.
  • In the left pane of the Local Group Policy Editor, navigate to "Computer Configuration" > "Administrative Templates" > "Windows Components" > "Windows Remote Management (WinRM) -> WinRM Client".
  • Allow the authentication protocols, depending on your needs.
  • In the Trusted Hosts field, enter '*' for any host, or type a list of trusted hosts.
  • Click "Apply" and then "OK" to save the changes.
  • Make sure your firewall accepts the WinRM port(s). Default ports are: 5985 (non-secure HTTP) and 5986 (secure HTTPs).
  • Open a command prompt with administrative privileges.
  • Type "winrm quickconfig" and press "Enter" to configure WinRM.
  • You should see a message that says "WinRM service is already running on this machine".

To confirm that WinRM is enabled, see FAQ #Q7260015

(viewed: 775)