Azure: Extend Psh command with two columns resource type & name
I am trying to write a Azure Psh command with two columns resource type & name and query the RBAC assignments for a user. I have these two tables, is there a way to merge the following two tables? Following is my current progress with the command:
Get-AzRoleAssignment -SignInName A12345@abc.com | Select-Object -Property RoleDefinitionName, {Get-AzResource -ResourceId $_.RoleAssignmentID | Select-Object -Property Name,ResourceType} | Format-Table;
Get-AzRoleAssignment -SignInName A12345@abc.com | Select-Object -Property RoleDefinitionName, {Get-AzResource -ResourceId $_.Scope | Select-Object -Property Name, ResourceType} | Format-Table