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

Add AuditEnabled to EXOSharedMailbox #5748

Open
wants to merge 4 commits into
base: Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@
* FIXES [#5741] Missing -All variable which prevented enumeration of more than 100 Groups
* EXORetentionPolicyTag
* Initial release.
* EXOSharedMailbox
* Add AuditEnabled property
* EXOSmtpDaneInbound
* Updated authentication properties to align with MOF definition.
FIXES [#5709](https://github.com/microsoft/Microsoft365DSC/issues/5709)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ function Get-TargetResource
[System.String[]]
$EmailAddresses,

[Parameter()]
[System.Boolean]
$AuditEnabled,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
Expand Down Expand Up @@ -137,6 +141,7 @@ function Get-TargetResource
Identity = $mailbox.Identity
PrimarySMTPAddress = $mailbox.PrimarySMTPAddress.ToString()
Alias = $mailbox.Alias
AuditEnabled = $mailbox.AuditEnabled
EmailAddresses = $CurrentEmailAddresses
Ensure = 'Present'
Credential = $Credential
Expand Down Expand Up @@ -189,6 +194,10 @@ function Set-TargetResource
[System.String[]]
$EmailAddresses = @(),

[Parameter()]
[System.Boolean]
$AuditEnabled,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
Expand Down Expand Up @@ -374,6 +383,10 @@ function Test-TargetResource
[System.String[]]
$EmailAddresses,

[Parameter()]
[System.Boolean]
$AuditEnabled,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class MSFT_EXOSharedMailbox : OMI_BaseResource
[Write, Description("The primary email address of the Shared Mailbox")] string PrimarySMTPAddress;
[Write, Description("The alias of the Shared Mailbox")] string Alias;
[Write, Description("The EmailAddresses parameter specifies all the email addresses (proxy addresses) for the Shared Mailbox")] string EmailAddresses[];
[Write, Description("The AuditEnabled parameter specifies whether to enable or disable mailbox audit logging for the mailbox. If auditing is enabled, actions specified in the AuditAdmin, AuditDelegate, and AuditOwner parameters are logged")] boolean AuditEnabled;
[Write, Description("Present ensures the group exists, absent ensures it is removed"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
[Write, Description("Credentials of the Exchange Global Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand Down