mirror of
				https://github.com/mgeeky/Penetration-Testing-Tools.git
				synced 2025-11-04 04:55:26 +01:00 
			
		
		
		
	Dump-AzureRoles.ps1
This commit is contained in:
		@@ -158,7 +158,7 @@ Second part contains full definitions of each role along with their permissions
 | 
			
		||||
    $count = 0
 | 
			
		||||
    $azureRbacRoles | % {
 | 
			
		||||
        $count += 1
 | 
			
		||||
        #Write-Host "| $count | ``$($_.Name)`` | _$($_.Description)_ | ``$($_.Id)`` |"
 | 
			
		||||
        Write-Host "| $count | ``$($_.Name)`` | _$($_.Description)_ | ``$($_.Id)`` |"
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Write-Host @"
 | 
			
		||||
@@ -171,12 +171,12 @@ Second part contains full definitions of each role along with their permissions
 | 
			
		||||
|---|----------|-----------------|--------|
 | 
			
		||||
"@
 | 
			
		||||
 | 
			
		||||
    #$azureADRoles = (Get-AzureADDirectoryRoleTemplate | sort -property displayname)
 | 
			
		||||
    $azureADRoles = (Get-AzureADDirectoryRoleTemplate | sort -property displayname)
 | 
			
		||||
 | 
			
		||||
    $count = 0
 | 
			
		||||
    $azureADRoles | % {
 | 
			
		||||
        $count += 1
 | 
			
		||||
        #Write-Host "| $count | ``$($_.DisplayName)`` | _$($_.Description)_ | ``$($_.ObjectId)`` |"
 | 
			
		||||
        Write-Host "| $count | ``$($_.DisplayName)`` | _$($_.Description)_ | ``$($_.ObjectId)`` |"
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Write-Host @"
 | 
			
		||||
@@ -204,6 +204,6 @@ This section contains detailed definitions of each role along with their assigne
 | 
			
		||||
"@
 | 
			
		||||
 | 
			
		||||
    $azureADRoles | % {
 | 
			
		||||
        #Get-ARTADRolePermissions -RoleName $_.DisplayName
 | 
			
		||||
        Get-ARTADRolePermissions -RoleName $_.DisplayName
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user