Aug 15 2019 09:07 AM
I have a service account that I use for scripting some things in Exchange, but for some reason that I can't figure out, it doesn't get Get-DynamicDistributionGroup:
Aug 15 2019 11:26 AM
SolutionIf you only get the Set- cmdlet, you most likely dont have the relevant role assigned ("Distribution Groups"), as the role should also contain the New-/Remove- cmdlets, in addition to the Get- one.
In particular the Set-DynamicDistributionGroup can also be granted as part of the MyDistributionGroups role, part of the default role assignment policy. And the role in question does not contain any of the other DDG cmdlets:
# Get-ManagementRoleEntry "MyDistributionGroups\*-DynamicDistributionGroup"
Name Role Parameters
---- ---- ----------
Set-DynamicDistributionGroup MyDistributionGroups {ErrorAction, ErrorVariable, Identity, MailTip, MailTipTranslations, OutBuffer, OutVariable}
which looks exactly what you are getting.
Aug 15 2019 12:22 PM
@VasilMichevThank you so much! I don't have access to the cmdlets to see what role is needed, so that is very helpful 🙂
Aug 15 2019 11:26 AM
SolutionIf you only get the Set- cmdlet, you most likely dont have the relevant role assigned ("Distribution Groups"), as the role should also contain the New-/Remove- cmdlets, in addition to the Get- one.
In particular the Set-DynamicDistributionGroup can also be granted as part of the MyDistributionGroups role, part of the default role assignment policy. And the role in question does not contain any of the other DDG cmdlets:
# Get-ManagementRoleEntry "MyDistributionGroups\*-DynamicDistributionGroup"
Name Role Parameters
---- ---- ----------
Set-DynamicDistributionGroup MyDistributionGroups {ErrorAction, ErrorVariable, Identity, MailTip, MailTipTranslations, OutBuffer, OutVariable}
which looks exactly what you are getting.