Add recipients from one DL to another DL


dear professional,

what wrong in following cmdlet.

$

$distributionsource = read-host "type source dl name"

dl test source

$distributiondestination  = read-host "type source dl name"

dl test destination

get-distributiongroupmember -identity $distributionsource | add-distributiongroupmember -identity $distributiondestination


ilyas mohammed

hi,

i suggest run below code:

get-distributiongroupmember -identity $distributionsource | export-csv c:\result.csv import-csv c:\result.csv |

foreach {add-distributiongroupmember -id $distributiondestination

-member $_.primarysmtpaddress }

please refer below linkl more details:

exchange server 2010 windows powershell: working distribution groups

http://www.packtpub.com/article/exchange-server-2010-windows-powershell-distribution-groups

regards,

yan li


yan li

technet community support




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

CRL Revocation always failed

Failed to query the results of bpa xpath

0x300000d errors in Microsoft Remote Desktop client