> 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/devolutions-server-powershell/run-as-custom-pam-providers-powershell-scripts-with-execution-context.md).

# Run as custom PAM providers PowerShell scripts with execution context

Konfigurér Run som indstilling at køre brugerdefineret PAM udbyder PowerShell scripts under en specifik lokal eller fjern execution kontekst i Devolutions Server.

***Run som*** indstilling lets De run brugerdefineret PAM udbyder scripts inden for different kontekster og kører scheduler til gør så. Denne kan være done på en lokal eller en fjern maskine, making den useful at finde ud hvad scriptet er trying til accomplish, om den er completing certain handlinger eller accessing certain filer.

{% hint style="info" %}
Devolutions Server allerede medtager Azure Nøgle Boks og Windows Konti [brugerdefineret scripts](https://docs.devolutions.net/pam/pam-with-devolutions-server/getting-started/custom-pam-providers/create-a-custom-pam-provider-in-devolutions-server#import-a-custom-pam-template) skabeloner.
{% endhint %}

### Kør Som PowerShell script i various kontekster

1. I Devolutions Server, go til ***Administration*** – ***Privilegeret Adgang*** – ***Udbydere***.
2. Click på ***Add***.
3. Click på ***Brugerdefineret*** fane.
4. Vælg en PAM udbyder derefter click ***Continue***.
5. Click på ***Run som*** fane.
6. I ***Legitimationsoplysning*** drop-ned liste, select enten;

   * Standard: Kører scriptet med aktuel scheduler konfiguration.
   * Brugerdefineret: Kører scriptet inden for en angivet ***Brugernavn***, ***Adgangskode*** og ***Vært navn***.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Den er advised til pick eller create en bruger med less tilladelser at teste et script.</p></div>
7. Click ***Save*** at lukke denne vindue og gem ændringerne.

#### Kontrollér for betroet værter

Hvis ***Run som*** er ikke pointing til en betroet vært, konfigurationen vil ikke work.

Her er kommandolinje at hente betroet værter: `Get-Item "WSMan:localhost\Client\TrustedHosts"`

Her er kommandolinje at opdatere lokal maskinen betroet værter med en certain værdi: `Set-Item 'WSMan:localhost\Client\TrustedHosts' -Value '*' -Force`

{% hint style="warning" %}
Gør certain at erstatte `*` i kommandoen over. Hvis venstre som er `*` acts som et jokertegn, som ville make hver fjern vært become betroet.
{% endhint %}

{% hint style="info" %}
Læs emne på [betroet værter](https://docs.devolutions.net/server/knowledge-base/how-to-articles/enable-winrm-and-add-trusted-hosts) for flere oplysninger.
{% endhint %}


---

# 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/devolutions-server-powershell/run-as-custom-pam-providers-powershell-scripts-with-execution-context.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.
