After updating from 2.7 to 2.9 the following code doesn’t work anymore.
When using Show-UDModal the $Roles variable is empty.
Is this by design or a bug?
function GetRoles
{
New-UDTypography -Text 'Roles:'
New-UDElement -Tag 'ul' -Content {
$Roles | ForEach-Object { if ($_ -inotlike 'S-1-*') { New-UDElement -Tag 'li' -Content { $_ } } }
}
}
$Pages = New-UDPage -Name 'PowerShell Universal' -Content {
GetRoles
New-UDButton -Text 'Show Roles' -OnClick {
Show-UDModal -Content {
GetRoles
}
}
}
New-UDDashboard -Page $Pages