Forum Discussion
sebgal
Aug 14, 2023Copper Contributor
How to add/remove allow sender of distribution group with powershell?
Hello, Please help me about how to add/remove allow sender of distribution group using Powershell? I did find a few answers like the one below: set the allow list users addresses:
Set-Distrib...
Aug 14, 2023
sebgal you can do that using powershell
$UserCredential = Get-Credential
Connect-ExchangeOnline -UserPrincipalName <YourAdminEmail> -ShowProgress $true -UserCredential $UserCredential
Add-DistributionGroupMember -Identity "DistributionListName" -Member "email address removed for privacy reasons", "email address removed for privacy reasons"
Disconnect-ExchangeOnline -Confirm:$false
sebgal
Aug 14, 2023Copper Contributor
This is the script I used:
$UserCredential = Get-Credential
Connect-ExchangeOnline -UserPrincipalName email address removed for privacy reasons -ShowProgress $true -UserCredential $UserCredential
Add-DistributionGroupMember -Identity "All Movo Insurance" -Member "email address removed for privacy reasons"
Disconnect-ExchangeOnline -Confirm:$false
$UserCredential = Get-Credential
Connect-ExchangeOnline -UserPrincipalName email address removed for privacy reasons -ShowProgress $true -UserCredential $UserCredential
Add-DistributionGroupMember -Identity "All Movo Insurance" -Member "email address removed for privacy reasons"
Disconnect-ExchangeOnline -Confirm:$false