Get-UDLocalStorage
Get a PowerShell-serialized value from browser local storage in a connected Universal app.
SYNOPSIS
Gets a value from browser local storage.
SYNTAX
Get-UDLocalStorage [-Name] <String>DESCRIPTION
Get-UDLocalStorage retrieves a value from browser local storage for the current connected client and deserializes it with the PowerShell serializer. A key that does not exist returns $null.
Use it from an interactive app handler with a connected browser. Values are scoped to the dashboard and persist in the same browser profile.
EXAMPLES
New-UDButton -Text 'Get Preference' -OnClick {
$preferences = Get-UDLocalStorage -Name 'preferences'
Show-UDToast "Page size: $($preferences.PageSize)"
}PARAMETERS
Parameter
Description
-Name
Local-storage item name.
OUTPUTS
The deserialized stored value, or $null when the item does not exist.
RELATED LINKS
Set-UDLocalStorage
Was this helpful?