---
title: "Discussion on \"Powershell - Add users from groups to assign group with group exceptions\" | Hashnode"
description: "Discussion on \"Powershell - Add users from groups to assign group with group exceptions\". # Ensure the Microsoft.Graph module is imported\n# Import-Module Microsoft.Graph\n\n# Authenticate using the managed identity\nConnect-MgGraph -Identity -NoWelcome\n#Connect-MgGraph -Scopes \"User.Read.All\", \"Group.ReadWrite.All\" -NoWelcome\n\n# Control vari..."
url: "https://hashnode.com/posts/powershell-add-users-from-groups-to-assign-group-with-group-exceptions/66fe5dc65984038aef537875"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Powershell - Add users from groups to assign group with group exceptions](https://www.oliviomoura.com/powershell-add-users-from-groups-to-assign-group-with-group-exceptions?utm_source=hashnode&utm_medium=feed)

\# Ensure the Microsoft.Graph module is imported # Import-Module Microsoft.Graph # Authenticate using the managed identity Connect-MgGraph -Identity -NoWelcome #Connect-MgGraph -Scopes "User.Read.All", "Group.ReadWrite.All" -NoWelcome # Control vari...

Oct 3, 2024 · 4 min read · oliviomoura.com  
Read the article

-   [#powershell](https://hashnode.com/tag/powershell)
-   [#azure](https://hashnode.com/tag/azure)
-   [#identity-management](https://hashnode.com/tag/identity-management)
-   [#azure-runbook](https://hashnode.com/tag/azure-runbook)

## Written by

[Olívio Moura](https://hashnode.com/@oliviomoura)

@oliviomoura

  
[View profile](https://hashnode.com/@oliviomoura)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
