> 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/rdm/fr/knowledge-base/how-to-articles/run-as-another-user/built-in-runas.md).

# RunAs intégré

{% hint style="info" %}
Cet article décrit la méthode intégrée d'utilisation de `RunAs`. Pour les types de sessions qui ne prennent pas encore en charge la méthode intégrée, vous pouvez suivre les étapes manuelles décrites dans [Manual RunAs](https://docs.devolutions.net/fr/rdm/kb/how-to-articles/running-rdm-as-another-user/).
{% endhint %}

### Paramètres

#### Types pris en charge

Les types suivants prennent actuellement en charge ***Run As*** :

| Option               | Description                                                                                      |
| -------------------- | ------------------------------------------------------------------------------------------------ |
| Session              | <ul><li>Command Line</li><li>PowerShell</li></ul>                                                |
| Macros/Scripts/Tools | <ul><li>Command Line</li><li>PowerShell Local</li><li>PowerShell Remote</li><li>PSExec</li></ul> |
| Session Add-on       | <ul><li>SQL Server Management Studio</li></ul>                                                   |

### Session

Les sessions qui prennent en charge Run As disposent d'un onglet Run As dans lequel vous spécifiez les informations d'identification à utiliser lors du démarrage avec Run As.

<figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4566.png" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="278">Option</th><th>Description</th></tr></thead><tbody><tr><td>None</td><td>Aucun Run As n'est effectué.</td></tr><tr><td>Current session</td><td>Utilise les mêmes informations d'identification que celles définies dans la session.</td></tr><tr><td>Custom credentials</td><td>Utilise des informations d'identification personnalisées spécifiées.</td></tr><tr><td>Credential repository</td><td>Utilise une entrée d'informations d'identification liée.</td></tr><tr><td>Use my personal credentials</td><td>Utilise une entrée d'informations d'identification personnelles liée.</td></tr></tbody></table>

### Macros/Scripts/Tools

Avec les types de sessions d'outils, vous n'avez qu'à spécifier ***Run as different user*** dans l'onglet ***Avancé***. Au moment de l'exécution, les informations d'identification sont résolues et utilisées pour démarrer les informations d'identification Windows, sauf si vous sélectionnez ***Use session credentials***, auquel cas celles actives pour la session seront utilisées.

<figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4567.png" alt=""><figcaption></figcaption></figure>

Avec les types de sessions d'outils, vous n'avez qu'à spécifier ***Run as different user***. Au moment de l'exécution, les informations d'identification sont résolues et utilisées pour démarrer le processus Run As.

### Session add-on

SQL Server Management Studio prend en charge Run As. Configurez-le comme vous configureriez une session normale.

<figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4568.png" alt=""><figcaption></figcaption></figure>

Cliquez sur ***Run as different user*** pour modifier les paramètres ***Run As***.

<figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4569.png" alt=""><figcaption></figcaption></figure>

### Notes

Run as Different User et Run As Administrator sont mutuellement exclusifs.

Run as Different User ne permet pas l'exécution via Shell Execute.

#### Exemple : session Command Line avec Run as different user sur le même groupe de travail/domaine

1. Créez une nouvelle session Command Line.
2. Définissez la commande sur ***CMD***.

   <figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4570.png" alt=""><figcaption></figcaption></figure>
3. Spécifiez les informations d'identification ***Run As***.

   <figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4571.png" alt=""><figcaption></figcaption></figure>
4. Enregistrez votre session.
5. Exécutez votre session Command Line.

   <figure><img src="https://cdnweb.devolutions.net/docs/docs_en_kb_KB4572.png" alt=""><figcaption></figcaption></figure>


---

# 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/rdm/fr/knowledge-base/how-to-articles/run-as-another-user/built-in-runas.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.
