Is it possible to restrict roles to specific pages or prevent them from accessing a page from view?
I tried to do this:
if ($Roles -notcontains 'Monitoring') {
$Pages += New-UDPage -Name 'Example' -Content {
..... code here .....
}
}
Even though the user is in the Monitoring Role, the page link is still shown for them. I know I can probably wrap the code inside the page to display not authorized message, but it would be better not even give the user the option to clicking it.