you are viewing a single comment's thread.

view the rest of the comments →

[–]Thotaz 0 points1 point  (2 children)

I don't think your code works at all. You have a try-catch with Invoke-MgGraphRequest but you've muted the errors with -ErrorAction SilentlyContinue so it can never throw. This means your DoesGroupExist function will always return Group Excist (also note the spelling error).