You want to create a distribution group that includes all users from the Marketing Department.
$Parameters = @{
Name = "Marketing Group"
DisplayName = "All Marketing Email List"
RecipientFilter = "(RecipientType -eq 'UserMailbox') -and (Department -eq 'Marketing')"
Confirm = $True
}
New-DynamicDistributionGroup @Parameters
Nothing clever here just an example of one way to create this type of group. As you add or remove users from the Marketing Department, the list automatically updates.
It may take time for all members to be added1. If you check the group membership too soon after creation, the group might be empty.
Many other configuration options are available for the group. Check the help for details.
Microsoft docs on managing DDGs ↩