Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXODistributionGroup: Add HiddenFromAddressListsEnabled parameter and support for other attributes #2761

Closed
Borgquite opened this issue Jan 9, 2023 · 5 comments
Assignees
Labels
Enhancement New feature or request Exchange Online V1.23.104.1 Version 1.23.104.1

Comments

@Borgquite
Copy link
Contributor

Details of the scenario you tried and the problem that is occurring

EXODistributionGroup does not support various parameters (it appears to only support those available with the New-DistributionGroup cmdlet, but there are many more under Set-DistributionGroup)

https://learn.microsoft.com/en-us/powershell/module/exchange/set-distributiongroup?view=exchange-ps

It would be really helpful to have HiddenFromAddressListsEnabled available - but other relevant fields should also be included?

  • AcceptMessagesOnlyFrom
  • AcceptMessagesOnlyFromDLMembers
  • AcceptMessagesOnlyFromSendersOrMembers
  • BypassModerationFromSendersOrMembers
  • CustomAttribute1 through CustomAttribute15
  • EmailAddresses
  • ExtensionCustomAttribute1 through ExtensionCustomAttribute5
  • GrantSendOnBehalfTo
  • HiddenFromAddressListsEnabled
  • MailTip
  • MailTipTranslations
  • RejectMessagesFrom
  • RejectMessagesFromDLMembers
  • RejectMessagesFromSendersOrMembers
  • ReportToManagerEnabled
  • ReportToOriginatorEnabled
  • SendOofMessageToOriginatorEnabled
  • SimpleDisplayName
  • WindowsEmailAddress

Verbose logs showing the problem

N/A

Suggested solution to the issue

Implement the ability to get, set and test these attributes when distribution groups are created/updated

The DSC configuration that is used to reproduce the issue (as detailed as possible)

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $credsAdmin
    )
    Import-DscResource -ModuleName Microsoft365DSC

    node localhost
    {
        EXODistributionGroup 'DemoDG'
        {
            Alias                              = "demodg";
            Ensure                             = "Present";
            HiddenFromAddressListsEnabled       = $True;
            Name                               = "DemoDG";
            Credential                         = $credsAdmin
        }
    }
}

The operating system the target node is running

N/A

Version of the DSC module that was used ('dev' if using current dev branch)

1.23.104.1

@andikrueger andikrueger added Enhancement New feature or request Exchange Online V1.23.104.1 Version 1.23.104.1 labels Jan 16, 2023
@Borgquite
Copy link
Contributor Author

Similar to #3089

@NikCharlebois
Copy link
Collaborator

The newly released EXOGroupSettings resource handles these parameters.

@Borgquite
Copy link
Contributor Author

Borgquite commented Apr 26, 2023

@NikCharlebois I don't think the module will work for distribution groups (-DistributionGroup cmdlets) since it only uses Microsoft 365 group cmdlets (-UnifiedGroup cmdlets). This would need either a separate resource, or a switch statement using Get-Recipient first then keying off RecipientTypeDetails (see below). However if you want to do it in one module bear in mind that a UnifiedGroup and DistributionGroup can share the same DisplayName since they're different object types, plus they support different sets of properties.

I'd suggest another module (could be a copy/paste job) as otherwise you'll have to do checks to make sure a user doesn't try to apply a UnifiedGroup only property to a DistributionGroup, and vice versa. But up to you.

RecipientTypeDetails = MailUniversalDistributionGroup or MailUniversalSecurityGroup -> *-DistributionGroup cmdlets
RecipientTypeDetails = GroupMailbox -> *-UnifiedGroup cmdlets

@Borgquite
Copy link
Contributor Author

@NikCharlebois Let me know if you want to re-open this - or would prefer for me to create a new issue

@Borgquite
Copy link
Contributor Author

Looks like a significant number of these attributes were added in 1.23.1004.1 - thank you!

c70ff49#diff-b042ce020f67b2bb35e3aa69486dee3a9a8f53091d84b63164222890f9ad0554R6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Exchange Online V1.23.104.1 Version 1.23.104.1
Projects
None yet
Development

No branches or pull requests

4 participants