# Command Execution

{% hint style="info" %}
This functionality is still in beta testing and was added in 2025
{% endhint %}

```
netexec rdp ip -u user -p password -x whoami
```

You can also add the flag `--cmd-delay` and `--clipboard-delay` to increase the time if the target is very slow:

<figure><img src="/files/y0ONq7xdLLIM7KvfTcM0" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
The use of -x option will disconnect the target user if connected (like a lock), not logoff therefore no work is lost and no application is closed.
{% endhint %}


---

# Agent Instructions: 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://www.netexec.wiki/rdp-protocol/command-execution.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.
