question

RichardM-3113 avatar image
0 Votes"
RichardM-3113 asked KyleXu-MSFT answered

Identifying groups with RequireSenderAuthenticationEnabled $FALSE

Hi All,

New to the Forums and not great with PowerShell scripts - can you advise the PowerShell command for searching all Distribution and security groups with the parameter RequireSenderAuthenticationEnabled $FALSE so I can identify any groups allowing unauthenticated senders to email to it?

Thanks
Richard

office-exchange-server-administrationwindows-server-powershellwindows-active-directory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thameur-BOURBITA avatar image
0 Votes"
Thameur-BOURBITA answered RichMatheisen-8856 commented

Hi,

 #Regaring cloud groups:
    
 Get-UnifiedGroup | Where-Object {$_.RequireSenderAuthenticationEnabled -eq $false}
    
    
 #Regarding the distribution list
    
 Get-DistributionGroup -filter * | Where-Object {$_.RequireSenderAuthenticationEnabled -eq $false}

Please don't forget to mark helpful reply as answer

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This doesn't bring back any results when connect to Exchange 365 with connect-exchangeonline?

Get-UnifiedGroup | Where-Object {$_.RequireSenderAuthenticationEnabled -eq $false}

0 Votes 0 ·

This doesn't bring back any results when connect to Exchange 365 with connect-exchangeonline?

if no error, it means that you have no group with the value $ false


Did you try this command on on-premise exchange ?

Get-DistributionGroup -filter * | Where-Object {$_.RequireSenderAuthenticationEnabled -eq $false}



Please don't forget to mark helpful reply as answer

0 Votes 0 ·
  1. Why not use the -Filter parameter on both cmdlets?

  2. Why not incorporate the check for RequireSenderAuthenticationEnabled in the filters and dispense with the need for using Where-Object to do the selection?

0 Votes 0 ·
LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello @RichardM-3113

The best solution for me is Get-DistributionGroup -ResultSize unlimited | Export-Csv c:\1.csv and use Excel to filter data.

or you can run this cmd

Get-DistributionGroup | FT Name, RequireSenderAuthenticationEnabled


--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KyleXu-MSFT avatar image
0 Votes"
KyleXu-MSFT answered

@RichardM-3113

You can use command below to check them:

For Distribution group:

 Get-DistributionGroup | where{$_.GroupType -eq "Universal" -and $_.RequireSenderAuthenticationEnabled -eq $false}

For Security Group:

 Get-DistributionGroup | where{$_.GroupType -like "*SecurityEnabled" -and $_.RequireSenderAuthenticationEnabled -eq $false}

If you are using Exchange on-premises, you need to run above commands in EMS(Exchange Management Shell)

If you are using Exchange online, you need to connect to Exchange online with PowerShell, then run above commands in it.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.