> 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-universal/powershell-commands/get-psucache.md).

# Get-PSUCache

Get-PSUCache retrieves data stored in the PowerShell Universal server wide cache that is shared across APIs, dashboards, and scripts.

## SYNOPSIS

Returns data from the server-wide cache.

## SYNTAX

```powershell
Get-PSUCache -Key <String> [-Detail] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies] [<CommonParameters>]
Get-PSUCache [-Key <String>] -List [-Detail] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies] [-Skip <UInt64>] [-First <UInt64>] [-IncludeTotalCount] [<CommonParameters>]
```

## DESCRIPTION

Returns data from the server-wide cache shared between APIs, dashboards, and scripts. Values are stored as CLIXML and deserialized when retrieved by key. Use `-List` to return cache items (100 per page by default); optionally filter by key and page through them. This cmdlet can also be called remotely through the PowerShell Universal Management API.

## EXAMPLES

### Example 1

```powershell
Get-PSUCache -Key 'DataTable'
```

Returns the DataTable cache data. Server-wide cache data is stored as CLIXML and deserialized before being returned to the pipeline.

## PARAMETERS

| Parameter                | Description                                                                              |
| ------------------------ | ---------------------------------------------------------------------------------------- |
| `-Key`                   | Cache key to retrieve; optional filter with `-List`.                                     |
| `-List`                  | Returns cache items rather than a deserialized cache value.                              |
| `-Detail`                | Returns the cache item details rather than the deserialized value when retrieving a key. |
| `-Skip`                  | Number of cache items to skip when listing.                                              |
| `-First`                 | Maximum cache items to list; defaults to 100 when omitted.                               |
| `-IncludeTotalCount`     | Emits the total count of matching cache items when listing.                              |
| `-ComputerName`          | URL or host name of the PowerShell Universal server; alias `-Uri`.                       |
| `-AppToken`              | App token for the Management API.                                                        |
| `-Credential`            | Credentials for the Management API.                                                      |
| `-UseDefaultCredentials` | Uses current Windows credentials.                                                        |
| `-Integrated`            | Uses the in-process management client inside PowerShell Universal.                       |
| `-TrustCertificate`      | Ignores certificate validation errors.                                                   |
| `-Cookies`               | Reuses authentication cookies for the PowerShell session.                                |

## INPUTS

None.

## OUTPUTS

`System.Object` (deserialized value or cache items).

## RELATED LINKS

[Set-PSUCache](/powershell-universal/powershell-commands/set-psucache.md)

## PERMISSIONS

The access token requires `platform.cache/read` to run this cmdlet remotely.


---

# 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-universal/powershell-commands/get-psucache.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.
