I'm working on sort-of a script for creating new DGs in exchange online powershell. But I miss some of the parameters (and can't find them on technet) for the command.
so in a nutshell, i use command New-DistributionGroup. I know how to do most of the tasks, that I need. But I can't figure out, how to do 3 of them (and I apologise, if I name something wrong - my exchange gui is in polish, so I'm translating back to english):
1) hide the group from address list. this is disabled by default, how do I enable it with powershell?
2) who can send messages to the group (is it open only for internal use or for everyone, even from outside of the organisation), this is restricted for internal by default
3) how do i change the default domain in address for the group? ex. if i create group ADMINS on my tennant, it would by default create with COMPANY.ONMICROSOFT.COM sufix. how do i change it to be COMPANY.COM, and maybe for some other groups something like COMPANY.PL, COMPANY.DE etc? should I do it with primarySMTPAddress parameter? If yes, then could you please bring an example?
EDIT:
just in case - if that's nercessary, I'm ok with running two commands - one for creating a group and second (or more) to modify it.