We are working on adding logging to our PowerShell Universal instance and believe that it would be quite helpful to have three additional pre-defined variables available in dashboards:
$DashboardName - ex ‘MyTestDashboard’
$DashboardFilePath - ex ‘MyTestDashboard.ps1’
$DashboardBaseUrl - ex ‘/myTestDashboard’
If this could be added that would be very helpful!
These will be available in 2.3.0 which will be released September 14th. We’ve moved to a monthly release for all products on the second Tuesday of the month.
I’ll check on the $Identity variable. I thought that had been added to dashboards but maybe we have a bug there.
You can use this to look up all variables in your dashboard:
$Data = Get-Variable | Select Name, Value
New-UDTable -Data $Data
Also, the docs had the wrong variable (fixed). It should be $User not $UserName. I don’t see $Identity referenced but I’m assuming you’re looking for $ClaimsPrincipal.