Issue 364 - Failed to create group caused by wrong mailNickname
This commit is contained in:
Mikael Karlsson
2025-09-23 20:18:22 +10:00
parent 8368af379f
commit 286f238fde
+1 -11
View File
@@ -3084,17 +3084,7 @@ function Get-GraphMigrationObjectsFromFile
{ {
$groupName = $migTableGroupName $groupName = $migTableGroupName
Write-Log "No group object found for $groupName. Creating a cloud group with default settings" 2 Write-Log "No group object found for $groupName. Creating a cloud group with default settings" 2
$dateStr = ((Get-Date).ToString("yyMMddHHmmss")) $nickName = (New-Guid).Guid.SubString(0,10)
if(($groupName.Length + $dateStr.Length) -gt 64)
{
$nickName = $groupName.Substring(0,(64-$dateStr.Length))
}
else
{
$nickName = $groupName
}
$nickName = $nickName + $dateStr
$groupJson = @" $groupJson = @"
{ {