> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/server/knowledge-base/how-to-articles/enable-winrm-and-add-trusted-hosts.md).

# Enable WinRM and add trusted hosts

This guide provides steps to enable WinRM and add the name of a remote machine in the trusted hosts list on the server where Devolutions Server is hosted. WinRM transport ports are 5985 for HTTP and 5986 for HTTPS.

1. Ensure that WinRM is enabled on the remote machine where the local accounts are located. The `winrm quickconfig` command can be used to enable WinRM.

{% hint style="info" %}
For further details, consult [Enable Windows Remote Shell](https://docs.microsoft.com/en-us/troubleshoot/windows-server/remote/how-to-enable-windows-remote-shell) and [Installation and configuration for Windows Remote Management](https://learn.microsoft.com/en-us/windows/win32/winrm/installation-and-configuration-for-windows-remote-management).
{% endhint %}

2. Add the name of the remote machine in the trusted hosts list of the machine on which Devolutions Server is hosted. Here are the PowerShell commands.

* To add all remote hosts at once: `Set-Item WSMan:localhost\client\trustedhosts -value *`
* To add all remote hosts from a specific domain to the trusted host list: `Set-Item WSMan:\localhost\Client\TrustedHosts *.yourdomain.local`
* To add one single host to the existing trusted host list: `Set-Item WSMan:\localhost\Client\TrustedHosts host.yourdomain.local -Concatenate`

#### See also

* [Enable PowerShell WinRM Remoting in PowerShell 7](https://awakecoding.com/posts/enable-powershell-winrm-remoting-in-powershell-7/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/server/knowledge-base/how-to-articles/enable-winrm-and-add-trusted-hosts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
