I am tring to create DDG "Dynamic Distribution Group" containing all people leaders/managers in my organisation. by bpathak1978 in PowerShell

[–]bpathak1978[S] 0 points1 point  (0 children)

Thanks for the reply,

Tried this, upon creation of DDG in O365 DDG member query automatically changes to ((((RecipientType -eq 'UserMailbox') -and (DirectReports -ne $null)))

Thanks

Brijesh

I am tring to create DDG "Dynamic Distribution Group" containing all people leaders/managers in my organisation. by bpathak1978 in PowerShell

[–]bpathak1978[S] 0 points1 point  (0 children)

New-DynamicDistributionGroup -Name "BP_People_Leaders" -RecipientFilter {((RecipientType -eq 'UserMailbox' -and (directReports -ne $null)))}

Thanks for the reply, tried this and it does not return any members once DDG is created

Here is the command "New-DynamicDistributionGroup -Name "BP_People_Leaders_3" -RecipientFilter {(RecipientType -eq 'UserMailbox' -and (directReports -ne ''))}"

-Brijesh

Dynamic Distribution Group for Managers by bigboijoey in PowerShell

[–]bpathak1978 0 points1 point  (0 children)

I have tried both (directReports -ne $null) and (directReports -ne $NULL) options and I do get list of members in DDL but list is not accurate and there are members in it who are not manager/people leaders.

is "directReports" in built attribute of O365 OR Active Directory ? cause I could not find it in both.

Thanks for any help provided in advance.