Basic commands of Powershell related to Distribution List (DL)

  1. Get-DistributionGroupMember -Identity “GROUP_NAME@rajanmaharjan.com” -ResultSize Unlimited | Select Name, PrimarySMTPAddress | Export-CSV “D:\Rajan-1145\Office365\members-of-dl.csv” -NoTypeInformation -Encoding UTF8
  2. Add-DistributionGroupMember -Identity “GROUP_NAME@rajanmaharjan.com” -Member “rajan@rajanmaharjan.com”

Leave a Reply

Your email address will not be published. Required fields are marked *