> 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/de/remote-desktop-manager-powershell/powershell-scripting/custom-powershell-commands/batch-actions-samples.md).

# Beispiele für Stapelaktionen

Die ***Batch actions*** bieten eine schnelle Möglichkeit, mehrere Sitzungen gleichzeitig zu ändern, jedoch innerhalb von Remote Desktop Manager selbst.

Um Ihr PowerShell-Skript erstellen zu können, benötigen Sie den Namen des Feldes bzw. der Felder, die Sie aktualisieren möchten. Um den exakten Namen des Feldes abzurufen, klicken Sie mit der rechten Maustaste auf Ihre Sitzung und wählen Sie ***Clipboard – Copy***. Sie können die Informationen dann in einen Texteditor einfügen, um den Namen des Feldes bzw. der Felder abzurufen, die Sie über den benutzerdefinierten PowerShell-Befehl ändern möchten.

{% hint style="info" %}
Für Ordner siehe [Ordner mit benutzerdefinierten PowerShell-Befehlen im Batch bearbeiten](/powershell/de/remote-desktop-manager-powershell/batch-edit-folders-with-custom-powershell-commands.md).
{% endhint %}

Da sie die Powershell-Technologie verwenden, stellen wir in diesem Abschnitt Beispiele bereit, weil die Felder gleich sind, unabhängig davon, ob sie über unsere Batch Actions oder über Powershell aufgerufen werden.

### Beispiele

#### Option "Only send password in HTML Password Field" in Website-Sitzungen deaktivieren

```powershell
$connection.Web.OnlySendPasswordInPasswordField = $false;
$RDM.Save ();
```

#### View Url Embedded aktivieren (Informationseinträge)

```powershell
$connection.DataEntry.ViewUrlDisplayMode = "Default";
$RDM.Save();
```

```powershell
ViewUrlDisplayMode: "Default" = embedded, "External" = external.
```

#### Open URL (external) für Web-Login (Informationseinträge)

```powershell
$connection.DataEntry.DefaultAction = "OpenUrlExternal";
$RDM.Save();
```

#### SSH Shell Batch-Bearbeitung (Sitzungstyp-Einstellungen)

```powershell
$connection.Terminal.MaxScrollbackLines = 2000;

$connection.Terminal.AlwaysAcceptFingerprint = $true;

$connection.Terminal.EnableLogging = $true;
$connection.Terminal.LogPath = '$LOGPATH$\$NAME$_$DATE_TEXT_ISO$_$TIME_TEXT_ISO$.log';
$connection.Terminal.LogMode = 1;
$connection.Terminal.LogOverwriteMode = 0;
$RDM.Save();
```

Hier sind einige Werte, die Sie für diesen Befehl ändern können;

LogPath: Ihr Pfad zwischen ' ' (einfache Anführungszeichen). Sie können auch Variablen verwenden, z. B. %USERPROFILE%, $NAME$ usw. In diesem Beispiel ist $LOGPATH$ eine benutzerdefinierte Variable, die in [System settings – Custom Variables](https://docs.devolutions.net/rdm/de/ribbon-menu-bar/administration/system-settings/application) definiert ist.

```powershell
LogMode: 1 = Printable Output, 0 = Event
TerminalLogOverwriteMode: 0 = default, 1 = prompt, 2 = append, 3 = overwrite
```

Hier sind auch weitere Optionen, die Sie ändern können;

```powershell
$connection.Terminal.BellMode = 'Visual'
$connection.Terminal.CloseOnDisconnect = $false
```

#### WebSite-Sitzungen in LogMeIn-Sitzungen umwandeln

```powershell
$connection.ConnectionType = 'LogMeIn';
$connection.ConnectionSubType = ' ';
$connection.LogMeIn.Url = $connection.WebBrowserUrl;
$RDM.Save();
```

**Aktivieren Sie "Hide script errors" in allen Ihren LogMeIn-Sitzungen.**

```powershell
$connection.LogMeIn.ScriptErrorsSuppressed = $true;
$RDM.Save();
```

**Navigationsleiste ausblenden.**

```powershell
$connection.LogMeIn.ShowUrl = $false;
$RDM.Save();
```

**Die Webbrowser-Anwendung ändern.**

```powershell
$connection.LogMeIn.WebBrowserApplication = "GoogleChrome";
$RDM.Save();
```

**Den Sandbox-Prozess aktivieren.**

```powershell
$connection.LogMeIn.SandboxProcess = $true;
$RDM.Save();
```

**Die URL ändern.**

```powershell
$connection.LogMeIn.Url = " ";
$RDM.Save();
```

**Das Feld Portal Login ändern.**

```powershell
$connection.LogMeIn.DashboardHostUrl = " ";
$RDM.Save();
```

**Benutzername & Passwort ändern.**

Bitte führen Sie diese beiden einzeln aus

Host;

```powershell
$connection.LogMeIn.UserName = " ";
$RDM.Save();
```

```powershell
$connection.LogMeIn.SafePassword = " ";
$RDM.Save();
```

Portal;

```powershell
$connection.LogMeIn. DashboardEmail = " ";
$RDM.Save();
```

```powershell
$connection.LogMeIn. SafePasswordDashboard = " ";
$RDM.Save();
```

#### Einen benutzerdefinierten Feldwert ändern, ohne die Daten zu ändern

```powershell
$connection.MetaInformation.CustomField3Title = "MyField"
$RDM.Save();
```

Bitte beachten Sie, dass Sie "MyField" durch den Wert ersetzen müssen, mit dem Sie Custom field #3 ersetzen möchten.

#### FQDN-Informationen für Sitzungen im Batch aktualisieren.

```powershell
$connection.host = $Connection.name + ".mydomain.com"
$RDM.Save();
```

#### Feld Recording für Putty-Sitzungen im Batch ändern

```powershell
$connection.Putty.RecordingMode = 1;
$connection.Putty.RecordingFileName = "C:\path\to\your\file.log"
$RDM.Save();
```

#### Das Feld Computer einer RDP-Sitzung ändern

```powershell
$connection.Url = " ";
$RDM.Save();
```

#### Encoding

```powershell
$connection.Putty.TelnetEncoding = "UTF-8";
$RDM.Save();
```

#### Das Ablaufdatum einer RDP-Sitzung ändern

Das Datum muss im ISO8601-Format angegeben werden.

```powershell
$connection.MetaInformation.Expiration = "2018-12-25T00:00:00-05:00";
$RDM.Save();
```

#### Das Ablaufdatum einer RDP-Sitzung mit einem relativen Datum ändern

Verwenden Sie einen beliebigen von PowerShell unterstützten Datums-/Zeit-Operator.

```powershell
$connection.MetaInformation.Expiration = (Get-Date).AddMonths(6);
$RDM.Save();
```

#### Seiten-Tab-Titel in der Benutzeroberfläche ändern

```powershell
$connection.TabTitle = '$COMPANY_NAME$ - $NAME$';
$RDM.Save();
```

#### Schlüsselwörter in einer Sitzung löschen

```powershell
$connection.MetaInformation.Keywords = ";
$RDM.Save();
```

#### History Max lines für SSH Shell (Rebex) ändern

```powershell
$connection.Putty.HistoryMaxLength = 2000;
$RDM.Save();
```

#### Command Line-Tool in eine Command Line-Sitzung umwandeln

```powershell
$connection.ConnectionType = 3;
$RDM.Save();
```

#### Keyboard Hook für eine RDP-Sitzung ändern

```powershell
$connection.KeyboardHook = "OnTheRemoteComputer";
$RDM.Save();
```

#### Die Anmeldeinformations-Eigenschaft auf "Bei Verbindung abfragen" setzen und an einen Ordner binden.

```powershell
$connection.CredentialConnectionGroup = "YourFolderPath\Credentials"
$connection.CredentialConnectionID = "00000000-0000-0000-0000-000000000000"
$connection.CredentialConnectionSavedPath = "--- Prompt on connection ---"
$RDM.Save();
```


---

# 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.devolutions.net/powershell/de/remote-desktop-manager-powershell/powershell-scripting/custom-powershell-commands/batch-actions-samples.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.
