Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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}

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report