Last active
August 13, 2021 09:44
-
-
Save LudovicOmarini/7e1713e5038f5eb1889cf05f05cd335b to your computer and use it in GitHub Desktop.
This script is used to rename an Office 365 group.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.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