Set-UDLocalStorage
Store a PowerShell-serialized value in browser local storage for a connected Universal app client.
SYNOPSIS
Sets a value in browser local storage.
SYNTAX
Set-UDLocalStorage [-Name] <String> [-Value] <Object>DESCRIPTION
Set-UDLocalStorage serializes a value with the PowerShell serializer and stores it in browser local storage for the current connected client. Values persist in that browser profile and are scoped to the dashboard.
Use it from an interactive app handler with a connected browser. Browser local storage is readable by scripts running in the page; do not store credentials, passwords, tokens, API keys, or other sensitive data.
EXAMPLES
New-UDButton -Text 'Save Preference' -OnClick {
Set-UDLocalStorage -Name 'preferences' -Value @{
PageSize = 25
Theme = 'Dark'
}
}PARAMETERS
Parameter
Description
-Name
Local-storage item name.
-Value
Value to serialize and store.
OUTPUTS
None.
RELATED LINKS
Get-UDLocalStorage
Was this helpful?