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

# Batch actions samples

Gennemse PowerShell script eksempler for Remote Desktop Manager Batch handlinger, covering SSH, LogMeIn, RDP, og brugerdefineret felt session indstillinger.

***Batch handlinger*** allow for en quick måde at redigere flere sessioner på én gang, men inden for Remote Desktop Manager itself.

Til være able at oprette Deres PowerShell script, De ville behøver navnet af feltet(s) at De ville som at opdatere. For at hente nøjagtigt navn af feltet, rettighed-click på Deres session og select ***Clipboard – Copy***. De kan derefter paste oplysningen i en tekst editor at hente navnet af feltet(s) at De ville som at redigere via Brugerdefineret PowerShell Kommando.

{% hint style="info" %}
For mapper, se [Masseredigering af mapper med brugerdefinerede PowerShell-kommandoer](/powershell/da/remote-desktop-manager-powershell/batch-edit-folders-with-custom-powershell-commands.md).
{% endhint %}

Since de brug Powershell technology, vi angiver eksempler i denne afsnit fordi felterne er samme når accessed gennem vores Batch Handlinger eller gennem Powershell.

### Samples

#### Deaktivér Kun send adgangskode i HTML Adgangskode Felt indstilling i Websted sessioner

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

#### Aktivér View URL Embedded (Oplysning Poster)

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

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

#### Åbn URL (ekstern) for web logon (Oplysning Poster)

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

#### SSH Shell-masseredigering (Session Type Indstillinger)

```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();
```

Her er nogle værdier at De kan ændring for denne kommando;

LogPath: Deres sti mellem ' ' (enkelt quotes). De kan også brug variabler. i.e. %USERPROFILE%, $NAME$, etc. I denne eksempel $LOGPATH$ er en brugerdefineret variabel defineret i [System indstillinger – Brugerdefinerede variabler](https://docs.devolutions.net/rdm/ribbon-menu-bar/administration/system-settings/application).

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

Her er også anden indstillinger at De kan modify;

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

#### Konvertér WebSite sessioner til LogMeIn sessioner

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

**Enable "Hide script fejl i alle Deres LogMeIn sessioner."**

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

**Hide navigation bar.**

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

**Ændring Web Browser Program.**

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

**Enable Sandbox Proces.**

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

**Ændring URL.**

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

**Ændring Portal Logon felt.**

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

**Ændring Brugernavn & Adgangskode.**

Run disse to en ved et klokkeslæt

Vært;

```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();
```

#### Ændring en brugerdefineret felt værdi uden changing data

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

Note at De ville behøver at skifte "MyField" for værdien at De vil at erstatte Brugerdefineret felt #3 med.

#### Bulk opdatering FQDN info til sessioner.

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

#### Bulk Ændring Optagelse Felt for Putty sessioner

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

#### Ændring computeren felt af en RDP-session

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

#### Encoding

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

#### Ændring udløb dato af en RDP-session

Datoen skal være angivet ved hjælp af ISO8601 format.

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

#### Ændring udløb dato af en RDP-session med en relativ dato

Brug enhver dato klokkeslæt operator understøttet af PowerShell.

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

#### Rediger Side Fane Titel i UI

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

#### Ryd Nøgleord i Session

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

#### Ændring Historik Max linjer for SSH Shell (Rebex)

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

#### Konvertér Kommandolinje værktøj til en Kommandolinje session

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

#### Ændring Keyboard Hook for en RDP-session

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

#### Angiv legitimationsoplysning egenskab at bede på forbindelse og bind den til en mappe.

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