Skip to content

Instantly share code, notes, and snippets.

@LudovicOmarini
Last active August 13, 2021 09:44
Show Gist options
  • Save LudovicOmarini/7e1713e5038f5eb1889cf05f05cd335b to your computer and use it in GitHub Desktop.
Save LudovicOmarini/7e1713e5038f5eb1889cf05f05cd335b to your computer and use it in GitHub Desktop.
This script is used to rename an Office 365 group.
<#
.SYNOPSIS
Renames an Office 365 group.
.DESCRIPTION
This script is used to rename an Office 365 group.
.EXAMPLE
Change "Identity" and "DisplayName" parameters before running this script.
.\Rename_O365_Group.ps1
#>
$Credential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ `
-Credential $Credential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
Set-UnifiedGroup -Identity "GROUP_MAIL@domain.com" -DisplayName "New Office365 Group Name" -Notes "New Office365 Group Description"
Remove-PSSession $Session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment