Below command makes connection to you Azure environment and looks which users are in the Azure predefined groups
# Connect to MSOL
$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential
# Get all users from azure groups
$roles = Get-MsolRole
foreach ($role in $roles)
{
write-host $role.Name -ForegroundColor Green
Get-MsolRoleMember -RoleObjectId $role.ObjectId
}
Geen opmerkingen:
Een reactie posten