# Attaching Scripts

## Attaching Post Rotation Scripts

When creating or editing a PAM record, click on the **Add PAM Script** button

<div data-full-width="false"><figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FBlKciADdzYLIjU7U2H9I%2FpostRotation1.png?alt=media&#x26;token=401d3f39-31a3-46f4-bb1c-34ef8879f382" alt=""><figcaption></figcaption></figure></div>

Clicking on **Add PAM Script** will allow you to:

* Browse locally and choose your Rotation Script(s).
* Add "Additional Credentials". This is an option to add additional records which contains the credentials needed by the post rotation script. These credentials must be available to the Keeper Gateway.
* Specify an optional custom command to executed. In the below screenshot, a python script (`postRotationTest.py`) is attached, and a specific command to be used to execute the python script.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2Fgit-blob-3dbdb051048429cea58bce237a29329bf9062197%2Fimage.png?alt=media" alt="" width="344"><figcaption></figcaption></figure>

After successfully selecting the script(s), the record will be updated to show the attached Post Rotation scripts:

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FZvKxKi8ninqof9UZ9wE1%2FpostRotation2.png?alt=media&#x26;token=658e3d53-4cb1-44bb-9636-5cbaf1e5211e" alt=""><figcaption></figcaption></figure>

Click Save to create or update the record. Attached Post Rotation Scripts can be deleted or edited by clicking on their respective actions.


---

# 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://docs.keeper.io/en/keeperpam/privileged-access-manager/password-rotation/post-rotation-scripts/attaching-post-rotation-scripts-to-records.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.
