Get the App
SLTechnology News&Howtos  ›  Servers  › 

SFB project experience-61-cross-forest migration distribution group-Export the Distribution Groups

Shulou Source: shulou.com Published: 2022-06-02 23:39:36 10月03日 Update

SFB project experience-61-cross-forest migration distribution group-Export the Distribution Groups

User requirements:

When customers migrate Exchange 2010 to 2010 across forests, they need to migrate a lot of communication groups, including many users.

How to migrate is the easiest and most convenient?

Batch migration of distribution groups across forests can be achieved through the following steps.

Solution:

*********************

1. User domain (export-distribution group)

*********************

# # #

Active Directory Module (ADM) for Windows PowerShell

# # #

Export the Distribution Groups

Get-ADGroup-Filter {GroupCategory-eq "Distribution"} | select Name | Export-Csv-Path "c:\ Export\ DGList.csv"

*********************

two。 Target Domain (Import-Distribution Group)

*********************

&

Exchange Management Shell

&

Imported the distribution groups

Import-Csv "C:\ Export\ DGList.csv" | ForEach {New-DistributionGroup-Name $_ .Name}

* *

3. User domain (export-distribution group-medium-user)

* *

# # #

Active Directory Module (ADM) for Windows PowerShell

# # #

Get-ADGroup-Filter {GroupCategory-eq "Distribution"} | ForEach-Object {

$group=$_

$users=Get-ADGroupMember-Identity $group

Foreach ($dguser in $users) {

New-Object-TypeName PSobject-Property @ {

SAM=$dguser.SamAccountName

Group=$group.name

}

}

} | Export-Csv-Path "c:\ Export\ DGusers.csv"

# TYPE System.Management.Automation.PSCustomObject

"SAM", "Group"

"user1", "DG1"

"user2", "DG1"

"user3", "DG2"

"user3", "DG2"

"user1", "DG3"

"user3", "DG3"

* *

4. Target domain (Import-Distribution Group-medium-user)

* *

&

Exchange Management Shell

&

Import-Csv "C:\ Export\ DGusers.csv" | ForEach {Add-DistributionGroupMember-Identity $_ .Group-Member $_ .SAM}

Tags: Communications distribution groups users goals experience projects customers methods times steps requirements Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei NVidia MariaDB OPPO Reno Linux