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.
Groups in Microsoft 365 often evolve over time, requiring updates to reflect organizational changes. Automating these updates with Update-MgGroup:
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"
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 -GroupId "12345678-90ab-cdef-1234-567890abcdef" -DisplayName "New Group Name" -Description "Updated group description"
Update-MgGroup -GroupId "12345678-90ab-cdef-1234-567890abcdef" -Visibility Private
Update-MgGroup -GroupId "12345678-90ab-cdef-1234-567890abcdef" -MailNickname "NewAlias"
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