none
Dynamic Distribution Lists - removing spaces and updating RRS feed

  • General discussion

  • For a while i 've been playing around with this issue in my organisation. 

    My company is migrating to 365 and we needed to update all of our Dynamic distribution lists from LDAP to OPATH and remove any spaces in the ALIAS. These were created in 2003 version of Exchange.

    So i decided to share this with everyone, hopefully someone will go through the same process and this will be helpful, or just an advice from more experienced how would you have handled this. 

    I decided first to get all dynamic distribution lists that have a space in its Alias and save it to CSV file with this command:

    Get-DynamicDistributionGroup -OrganizationalUnit "western-inventory.com" | Where {$_.Alias -like "* *"} | export-csv c:\space.csv

    After I would append to a variable:

    $DistributionGroups = import-csv c:\space.csv

    and command that will remove all the spaces in DDL:

    ForEach($DistributionGroup in $DistributionGroups) {Set-DynamicDistributionGroup $DistributionGroup.Name -Alias:($DistributionGroup.Alias -Replace " ", "")}

    let me know what you think.

    Marko

    Thursday, December 25, 2014 8:08 PM

All replies