In a recent deployment, we came across an issue in SharePoint that disabled the use of alerts to members of security groups due to SharePoint sending the email anonymously. In order to fix the issue, I needed to change the ‘RequiresSenderAuthenticationEnabled’ property of the group to false. There were hundreds of security groups, so I had them dumped into a text file.
# This script will iterate through a flat file and retrieve a list of DLs or Security Groups.
# For each of the groups, we are going to change the RequiresSenderAuthenticationEnabled
# property of the group to false.
foreach($I in Get-Content -Path $settingsFile)
Write-Output “Attempting to change setting for ” $I
Set-DistributionGroup -id $I –RequireSenderAuthenticationEnabled $false