Distribution Group Migration Script

%3CLINGO-SUB%20id%3D%22lingo-sub-1708185%22%20slang%3D%22en-US%22%3EDistribution%20Group%20Migration%20Script%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1708185%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Guys%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe're%20in%20the%20process%20of%20migrating%20our%20distribution%20groups%20to%20Office%20365.%20We%20already%20have%20them%20sync'd%20to%20the%20cloud%20but%20have%20decided%20(for%20a%20number%20of%20reasons)%20to%20simply%20migrate%20them%20to%20the%20cloud%20completely.%20(mastered%20on%20office%20365)%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe're%20breaking%20this%20into%202%20parts%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EMigrate%20Non-Nested%20Groups%2C%3C%2FLI%3E%3CLI%3EMigrate%20Nested%20Groups.%20My%20question%20really%20applies%20to%20both.%26nbsp%3B%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20found%20this%20script%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgallery.technet.microsoft.com%2Foffice%2FPowerShell-Script-to-Move-5c3cd668%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgallery.technet.microsoft.com%2Foffice%2FPowerShell-Script-to-Move-5c3cd668%3C%2FA%3E%26nbsp%3Bits%20an%20old%20script%20but%20definitely%20works.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20script%20works%20this%20way%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3ECopies%20all%20settings%20of%20a%20group%20you%20specify%20to%20a%20temp%20group%20(creates%20a%20temp%20group)%3C%2FLI%3E%3CLI%3Eyou%20then%20remove%20the%20group%20from%20AD%20Connect%20run%20the%20sync%20process%3C%2FLI%3E%3CLI%3EYou%20then%20finalize%20the%20group%2C%20which%20means%20it%20basically%20takes%20the%20%22temp%22%20group%20and%20renames%20it%20to%20the%20original%20name%20of%20the%20group.%26nbsp%3B%3C%2FLI%3E%3C%2FOL%3E%3CP%3EThe%20only%20question%20I%20have%20is%20this%2C%20when%20the%20script%20renames%20the%20temp%20group%20to%20the%20perm%20group%2C%20it%20prepends%20the%20SamAccountName%20with%20Cloud-%20for%20every%20group%20it%20migrates.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20think%20that%20will%20be%20an%20issue%3F%20It%20does%20not%20affect%20anything%20that%20I%20can%20find%2C%20I%20realize%20if%20this%20were%20an%20all%20onprem%20environment%2C%20then%20it%20could%20very%20well%20be%20an%20issue.%20But%20since%20this%20is%20the%20cloud%2C%20i%20am%20not%20100%25.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ERobert%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1708185%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ehybrid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMigration%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1709392%22%20slang%3D%22en-US%22%3ERe%3A%20Distribution%20Group%20Migration%20Script%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1709392%22%20slang%3D%22en-US%22%3E%3CP%3ESimply%20edit%20that%20part%20of%20the%20script%20if%20it%20bothers%20you%20that%20much%3F%20Nothing%20in%20O365%20cares%20that%20much%20about%20samAccountName%20anyway.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent Contributor

Hey Guys, 

 

We're in the process of migrating our distribution groups to Office 365. We already have them sync'd to the cloud but have decided (for a number of reasons) to simply migrate them to the cloud completely. (mastered on office 365) 

 

We're breaking this into 2 parts:

 

  1. Migrate Non-Nested Groups,
  2. Migrate Nested Groups. My question really applies to both. 

 

I found this script here: https://gallery.technet.microsoft.com/office/PowerShell-Script-to-Move-5c3cd668 its an old script but definitely works. 

 

The script works this way: 

 

  1. Copies all settings of a group you specify to a temp group (creates a temp group)
  2. you then remove the group from AD Connect run the sync process
  3. You then finalize the group, which means it basically takes the "temp" group and renames it to the original name of the group. 

The only question I have is this, when the script renames the temp group to the perm group, it prepends the SamAccountName with Cloud- for every group it migrates. 

 

Do you think that will be an issue? It does not affect anything that I can find, I realize if this were an all onprem environment, then it could very well be an issue. But since this is the cloud, i am not 100%. 

 

Thanks, 


Robert 

2 Replies
Highlighted

Simply edit that part of the script if it bothers you that much? Nothing in O365 cares that much about samAccountName anyway.

Highlighted

@Vasil Michev 

 

As always, thanks for the response. 

 

I am not concerned in terms of how it looks, that I don't care about. I just wanted to make sure that it would cause problems with the objects themselves. This is for about 7K groups. 

 

It doesn't sound like its going to anyways. 

 

Thanks, 

 

Robert