Using Roles in Dashboards

Hello,
I am pretty new to Powershell Universal and I am scouring docs to figure out how to use the PU roles to control access to specific dashboards. I know this is most likely right in my face but I cannot for the life of me find an example of it. Thanks for any help…

from your dashboard code you can used $Roles variable