For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get-PSUCache

SYNOPSIS

Returns data from the server-wide cache.

SYNTAX

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

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).

Set-PSUCache

PERMISSIONS

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

Last updated

Was this helpful?