Good morning all and Happy New Year!
So, I've been tasked with doing an AD Consolidation, I'm struggling completely with the PowerShell.
Basically, all I need to do is search the subgroups of a top-level group.
So the top level group would be imported from a text file, we'll call it "Microsoft Office", beneath this we would have branches, such as
This would then have the computer accounts in it. I need to take the computer accounts from "ABC-Microsoft office" and put them into "Microsoft office".
However, there are multiple groups associated with the top level group, so I need it to go through all of them, using something like "Get-adgroupmember "Microsoft Office" move all the accounts and then I'll prep to delete the subgroups at a later stage.
Does anyone have a script they used before for this sort of work?