> 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/powershell/remote-desktop-manager-powershell/batch-edit-folders-with-custom-powershell-commands.md).

# Batch edit folders with custom PowerShell commands

Use Advanced search and the Custom PowerShell command special action in Remote Desktop Manager to batch edit multiple folders in a vault at once.

In Remote Desktop Manager, to edit several or all folders in a specific vault, you have to use the [Advanced search](https://docs.devolutions.net/rdm/ribbon-menu-bar/view/search/advanced-search) feature.

1. Go to ***View – Search – Advanced search*** (or access it using the <kbd>F11</kbd> keyboard shortcut).
2. Set the first search condition to ***Connection type***, then further specify the ***Folder*** type in the second drop-down menu.
3. Click ***Search***.
4. Select the folders you want to edit in the results.
   * Use <kbd>Shift</kbd>+click to select several folders one at a time.
   * Use <kbd>Ctrl</kbd>+<kbd>A</kbd> to select all the folders at once.
5. Right-click on your selection and select ***Edit – Edit (special actions)***.
6. Select the ***Custom PowerShell command*** special action, then click ***Execute***.
7. Enter your PowerShell command then click ***Ok***.

The command will run on all folders and edit them accordingly.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell/remote-desktop-manager-powershell/batch-edit-folders-with-custom-powershell-commands.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
