Update-MgGroup

What is Update-MgGroup?

The Update-MgGroup cmdlet in Microsoft Graph PowerShell is used to modify existing Microsoft 365 groups. It allows administrators to update group properties such as display names, descriptions, visibility, mail nicknames, and group settings like mail and security.


Why Use Update-MgGroup?

Groups in Microsoft 365 often evolve over time, requiring updates to reflect organizational changes. Automating these updates with Update-MgGroup:

  • Ensures accuracy when updating group information.
  • Saves time by applying changes directly through scripts.
  • Supports scalability when modifying multiple groups across large tenants.
  • Integrates with workflows for governance and policy compliance.

Prerequisites

Before running the cmdlet, install the Microsoft Graph PowerShell module and connect with the required permissions:

Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "Group.ReadWrite.All"

How to Use Update-MgGroup?

Syntax (essential parameters):

Update-MgGroup -GroupId <id> -Property <Value>

You can update single attributes like display name or visibility, or modify multiple properties at once, depending on your requirements.


Update-MgGroup Examples

  • Update Group Display Name and Description
  • Update-MgGroup -GroupId "12345678-90ab-cdef-1234-567890abcdef" -DisplayName "New Group Name" -Description "Updated group description"
  • Change Group Visibility to Private
  • Update-MgGroup -GroupId "12345678-90ab-cdef-1234-567890abcdef" -Visibility Private
  • Update a Group's Mail Nickname
  • Update-MgGroup -GroupId "12345678-90ab-cdef-1234-567890abcdef" -MailNickname "NewAlias"
  • Enable or Disable a Group's Mail and Security Settings
  • Update-MgGroup -GroupId "12345678-90ab-cdef-1234-567890abcdef" -MailEnabled $true -SecurityEnabled $false

Did You Know? Managing Microsoft 365 applications is even easier with automation. Try our Graph PowerShell scripts to automate tasks like generating reports, cleaning up inactive Teams, or assigning licenses efficiently.

Ready to get the most out of Microsoft 365 tools? Explore our free Microsoft 365 administration tools to simplify your administrative tasks and boost productivity.

© Your Site Name. All Rights Reserved. Design by HTML Codex