79420795

Date: 2025-02-07 11:57:34
Score: 1
Natty:
Report link

Below code snippet solved it for me

$teams = Get-Team
$count = 0
foreach ($team in $teams) {  
    $owner = Get-TeamUser -GroupId $team.GroupId -Role Owner
    if ($owner.User -eq "<UPN of your user>") {
        $team.DisplayName
        $count++
    }
} "found $count teams where the target user is owner"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Maik Nagy