Hi All
i have DLs and unified groups in the below format and i want to rename them i.e DisplayName, Email Address, Alias i am using exchange 2016 hybrid environment. experts guide me
in onprem dl do i need to include primarysmtp address. any other changes do i need to make, i have seperate csv file for onprem, online & unified groups. experts correct me with the syntaxes
ONPREM DL
$lists = Import-Csv "c:\temp\onpremdls.csv"
Foreach ($list in $lists) {
Write-Host $list.DN " TO " $list.DN-C
Set-DistributionGroup -Identity $list.Alias -DisplayName $list.DN-C -Alias $list.Alias-C
}
ONLINE DL
$lists = Import-Csv "c:\temp\onlinedls.csv"
Foreach ($list in $lists) {
Write-Host $list.DN " TO " $list.DN-C
Set-DistributionGroup -Identity $list.Alias -DisplayName $list.DN-C -Alias $Group.Alias-C -PrimarySmtpAddress $list.PSMTP-C
}
Unified Groups
$lists = Import-Csv "c:\temp\ug.csv"
Foreach ($list in $lists) {
Write-Host $list.DN " TO " $list.DN-C
Set-UnifiedGroup -Identity $list.PrimarySmtpAddress -DisplayName $list.DN-C -Alias $list.Alias-C -PrimarySmtpAddress $list.PSMTP-C