> For the complete documentation index, see [llms.txt](https://docs.plenit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plenit.com/docs-en/productos/remote-desktop/customization/how-to-create-reusable-server-templates.md).

# How to Create Templates on a Server to Reuse Them in Remote Desktop

Setting up a Remote Desktop environment from scratch is a repetitive process if you do it often.

With templates you automate it: you configure a server to your liking once, turn it into a template, and reuse it in future Remote Desktop deployments without repeating the entire installation.

> #### 👍 What you get
>
> A template created from an already configured server, ready to reuse in Remote Desktop deployments and save yourself repeated setup.

### Before you start

* Access the admin panel at [admin.plenit.com](https://admin.plenit.com) with permissions on the environment.
* Have an already deployed server with a Windows image (for example, Windows Server 2019 or 2016) and with the software and configuration you want to include in the template. If you need to create it, follow the [Server Quick Start.](/docs-en/productos/servers/quickstart.md)
* Start from a standard server, without Remote Desktop provisioned.

<br>

> #### 🚧 Server requirements before creating the template
>
> For the template to work in deployments, the source server must meet these requirements:
>
> * **Do not remove the local administrator user**: the platform uses it to interact with the server automatically (a random password is generated on each deployment).
> * **Keep the network interface on DHCP**: images come that way by default. A static IP can leave the deployment without network connectivity.
> * **Do not install the "Remote Desktop Services" role**: it is not necessary, because the deployment installs the software needed for connections. If it is installed, remove it from *Server Manager → Remove Roles and Features*.
> * **Do not use ports 80 or 443**: Remote Desktop software uses them in the deployment. If you need an IIS, change its port (for example 8080 or 4443) and then publish it via port forwarding from the Servers subscription firewall.

<br>

### Step 1. Prepare the server: remove the monitoring agent

The images include a monitoring agent that powers the dashboard graphs and alerts. To create a clean template, that agent must be removed from the source server before converting it.

Ask Partner Success to remove the monitoring agent from the server you are going to use as a template. It is a quick process and leaves the server ready for the rest of the procedure.

> #### 📘 Why this step is necessary
>
> The agent is designed for a server in operation, not for a template that is going to be cloned. Removing it before creating the image prevents it from being carried over to all deployments created from that template.

### Step 2. Sysprep the server

With the server prepared, run a **Sysprep** so that it has a unique SID, thus avoiding security issues caused by repeated SIDs across servers.

> #### 📘 Take a snapshot first
>
> Sysprep can only be run eight times on the same system. Before launching it, shut down the server and create a snapshot of the machine: if something goes wrong or you want to rebuild the template later, restore the snapshot and that limit resets.&#x20;
>
> Ideally, keep the RDP connection open to run the commands and keep the console visible so you can see when the server shuts down.

Connect to the server via RDP, open CMD as administrator, and run:

```
cd C:\Windows\System32\Sysprep
sysprep.exe /oobe /generalize /shutdown
```

{/\* 📸 SCREENSHOT 1 · CMD with the Sysprep commands \*/}

![Sysprep execution in the server CMD](https://REEMPLAZA-URL/escritorio-remoto-plantilla-01.png)

> #### ❗️ Shut down the server from the panel as soon as the system kicks you out of the console
>
> When Sysprep kicks the administrator out of the console, initiate the shutdown yourself **from the panel**, in the server details page.&#x20;
>
> If you let it shut down by itself, the platform interprets it as a crash and starts it back up, which invalidates the Sysprep. If that happens, restore the snapshot and repeat the process.

{/\* 📸 SCREENSHOT 2 · server shutdown from the panel, on the server details page \*/}

![Server shutdown from the panel after Sysprep](https://REEMPLAZA-URL/escritorio-remoto-plantilla-02.png)

<br>

### Step 3. Convert the server into a template

With Sysprep done and the server shut down, go to the **Servers → Servers** subscription and locate the server (it will be shut down). Open its **(...)** menu **Edit** to open its details page.

{/\* 📸 SCREENSHOT 3 · Servers · shut-down server · menu (…) › Edit \*/}

![Selection of the shut-down server and access to Edit](https://REEMPLAZA-URL/escritorio-remoto-plantilla-03.png)

On the server details page, click **Convert**.

{/\* 📸 SCREENSHOT 4 · server details page · Convert button \*/}

![Convert button on the server details page](https://REEMPLAZA-URL/escritorio-remoto-plantilla-04.png)

The images subsection opens: give the template a **name** and select the service where you want it available. Since it is for Remote Desktop, check **Remote Desktop**. Click **Continue** to create it.

{/\* 📸 SCREENSHOT 5 · template name and Remote Desktop service selection \*/}

![Template name and target service](https://REEMPLAZA-URL/escritorio-remoto-plantilla-05.png)

The platform creates the template and notifies you that it is being created and that it has been created successfully.

> #### 📘 Also from the Images subsection
>
> You can reach template creation in two ways: from the server in **Servers** (the one in this guide) or from the **Images** subscription subsection. Both do the same thing.

### Step 4. Reuse the template in a Remote Desktop deployment

When creating a new Remote Desktop subscription, in the last step of the wizard (**Server**), choose **another configuration** for the server. Go to **Image → My Images** (with a small scroll) and select the template you created.

{/\* 📸 SCREENSHOT 6 · ER signup · My Images · template selection \*/}

![Template selection in the Remote Desktop deployment](https://REEMPLAZA-URL/escritorio-remoto-plantilla-06.png)

When you save, the platform launches the Remote Desktop deployment with the configuration from that template, with much of the process already automated.

### Conclusion

Templates turn a tedious setup into something reusable: you prepare the server once, convert it into a template, and apply it in each Remote Desktop deployment.

The two things that most affect the result are meeting the source server requirements (admin user, DHCP, no Remote Desktop role, ports 80/443 free) and controlling the shutdown after Sysprep from the panel. With the template created, each new environment starts from your base configuration instead of from scratch.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.plenit.com/docs-en/productos/remote-desktop/customization/how-to-create-reusable-server-templates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
