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

Release 1.21.526.1 #1239

Merged
merged 27 commits into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
faca659
Merge pull request #7 from microsoft/Dev
RuudGijsbers Apr 30, 2021
bcc209e
New macOS Policy and additional Readme information
RuudGijsbers May 1, 2021
3e66f22
Merge branches 'Dev' and 'Dev' of https://github.com/RuudGijsbers/Mic…
RuudGijsbers May 1, 2021
9aa00bf
Updated readme
RuudGijsbers May 1, 2021
d1ad0f9
Create MSFT_EXOOfflineAddressBook.psm1
stvnmbr1 May 12, 2021
50dd684
Merge branch 'microsoft:Dev' into Dev
RuudGijsbers May 14, 2021
451af53
New resources
RuudGijsbers May 16, 2021
2510670
removed Android Enterprise policy
RuudGijsbers May 16, 2021
6f5fdc3
Updated changelog
RuudGijsbers May 16, 2021
7da73ea
updated unit test
RuudGijsbers May 16, 2021
a4c1a0f
edit TransportRule test
RuudGijsbers May 16, 2021
325eb9c
updated Test TransportRul
RuudGijsbers May 16, 2021
e7a2b97
Added shorter cmdlets for Intune
RuudGijsbers May 16, 2021
bcdcd48
update from MS
RuudGijsbers May 18, 2021
13a85aa
Merge branch 'microsoft:Dev' into Dev
RuudGijsbers May 18, 2021
719b1b3
Merge branch 'microsoft:Dev' into Dev
stvnmbr1 May 19, 2021
c3f55a1
Update MSFT_EXOMalwareFilterRule.psm1
stvnmbr1 May 19, 2021
61f79e3
Merge branch 'microsoft:Dev' into Dev
stvnmbr1 May 19, 2021
9c7f703
Update MSFT_EXOSafeAttachmentRule.psm1
stvnmbr1 May 19, 2021
0b9a463
Update MSFT_EXOSafeLinksRule.psm1
stvnmbr1 May 20, 2021
b39ca50
Changed ExceptIfSenderInRecipientList to an array
Swampen May 21, 2021
1965784
Merge pull request #1233 from Swampen/Dev
desmay May 26, 2021
3c00e78
Merge pull request #1212 from RuudGijsbers/Dev
desmay May 26, 2021
c693c9d
Merge pull request #1215 from stvnmbr1/Dev
desmay May 26, 2021
20f5534
Release 1.21.526.1
desmay May 26, 2021
eaee76f
Merge pull request #1238 from desmay/Dev
desmay May 26, 2021
d5df396
Merge branch 'master' into Dev
desmay May 26, 2021
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
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"powershell.codeFormatting.ignoreOneLineBlock": false,
"powershell.codeFormatting.alignPropertyValuePairs": true,
"powershell.codeFormatting.preset": "Custom",
"editor.formatOnSave": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.exclude": {
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# Change log for Microsoft365DSC
1.21.526.1
* EXOSafeAttachmentRule
* Fixed issue #1213 Policy X already has rule Y associated with it
if rule exists already
* MSFT_IntuneDeviceCompliancePolicyAndroid
* New resource
* MSFT_IntuneDeviceCompliancePolicyAndroidWorkProfile
* New resource
* MSFT_IntuneDeviceCompliancePolicyMacOS
* New resource
* MSFT_IntuneDeviceCompliancePolicyiOs
* New resource
* EXOTransportRule
* Fix #1230 Changed ExceptIfSenderInRecipientList to array

1.21.519.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,15 @@ function Set-TargetResource
{
$MalwareFilterRuleParams.Remove('Enabled') | Out-Null
Write-Verbose -Message "Setting MalwareFilterRule $($Identity) with values: $(Convert-M365DscHashtableToString -Hashtable $MalwareFilterRuleParams)"
Set-MalwareFilterRule @MalwareFilterRuleParams -Confirm:$false
if ($MalwareFilterRuleParams.MalwareFilterPolicy -ne $MalwareFilterRule.MalwareFilterPolicy)
{
Set-MalwareFilterRule @MalwareFilterRuleParams -Confirm:$false
}
else
{
$MalwareFilterRuleParams.Remove('MalwareFilterPolicy')
Set-MalwareFilterRule @MalwareFilterRuleParams -Confirm:$false
}
}
elseif (('Absent' -eq $Ensure ) -and ($null -ne $MalwareFilterRule))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,31 +283,46 @@ function Set-TargetResource
-InboundParameters $PSBoundParameters

$SafeAttachmentRules = Get-SafeAttachmentRule

$SafeAttachmentRule = $SafeAttachmentRules | Where-Object -FilterScript { $_.Identity -eq $Identity }
$SafeAttachmentRuleParams = [System.Collections.Hashtable]($PSBoundParameters)
$SafeAttachmentRuleParams.Remove('Ensure') | Out-Null
$SafeAttachmentRuleParams.Remove('GlobalAdminAccount') | Out-Null
$SafeAttachmentRuleParams.Remove('ApplicationId') | Out-Null
$SafeAttachmentRuleParams.Remove('TenantId') | Out-Null
$SafeAttachmentRuleParams.Remove('CertificateThumbprint') | Out-Null
$SafeAttachmentRuleParams.Remove('CertificatePath') | Out-Null
$SafeAttachmentRuleParams.Remove('CertificatePassword') | Out-Null

if (('Present' -eq $Ensure ) -and (-not $SafeAttachmentRule))
{
New-EXOSafeAttachmentRule -SafeAttachmentRuleParams $PSBoundParameters
}

if (('Present' -eq $Ensure ) -and ($SafeAttachmentRule))
elseif (('Present' -eq $Ensure ) -and ($SafeAttachmentRule))
{
if ($PSBoundParameters.Enabled -and ('Disabled' -eq $SafeAttachmentRule.State))
if ($SafeAttachmentRuleParams.Enabled -and ('Disabled' -eq $SafeAttachmentRule.State))
{
# New-SafeAttachmentRule has the Enabled parameter, Set-SafeAttachmentRule does not.
# There doesn't appear to be any way to change the Enabled state of a rule once created.
Write-Verbose -Message "Removing SafeAttachmentRule $($Identity) in order to change Enabled state."
Remove-SafeAttachmentRule -Identity $Identity -Confirm:$false
New-EXOSafeAttachmentRule -SafeAttachmentRuleParams $PSBoundParameters
New-EXOSafeAttachmentRule -SafeAttachmentRuleParams $SafeAttachmentRuleParams
}
else
{
Set-EXOSafeAttachmentRule -SafeAttachmentRuleParams $PSBoundParameters
}
if ($SafeAttachmentRuleParams.SafeAttachmentPolicy -ne $SafeAttachmentRule.SafeAttachmentPolicy)
{
Set-EXOSafeAttachmentRule -SafeAttachmentRuleParams $SafeAttachmentRuleParams
}
else
{
$SafeAttachmentRuleParams.Remove('SafeAttachmentPolicy')
Set-EXOSafeAttachmentRule -SafeAttachmentRuleParams $SafeAttachmentRuleParams
}
}
}

if (('Absent' -eq $Ensure ) -and ($SafeAttachmentRule))
elseif (('Absent' -eq $Ensure ) -and ($SafeAttachmentRule))
{
Write-Verbose -Message "Removing SafeAttachmentRule $($Identity)"
Remove-SafeAttachmentRule -Identity $Identity -Confirm:$false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,16 @@ function Set-TargetResource
-InboundParameters $PSBoundParameters

$SafeLinksRules = Get-SafeLinksRule

$SafeLinksRule = $SafeLinksRules | Where-Object -FilterScript { $_.Identity -eq $Identity }
$SafeLinksRuleParams = [System.Collections.Hashtable]($PSBoundParameters)
$SafeLinksRuleParams.Remove('Ensure') | Out-Null
$SafeLinksRuleParams.Remove('GlobalAdminAccount') | Out-Null
$SafeLinksRuleParams.Remove('ApplicationId') | Out-Null
$SafeLinksRuleParams.Remove('TenantId') | Out-Null
$SafeLinksRuleParams.Remove('CertificateThumbprint') | Out-Null
$SafeLinksRuleParams.Remove('CertificatePath') | Out-Null
$SafeLinksRuleParams.Remove('CertificatePassword') | Out-Null


if (('Present' -eq $Ensure ) -and (-not $SafeLinksRule))
{
Expand All @@ -292,7 +300,15 @@ function Set-TargetResource
}
else
{
Set-EXOSafeLinksRule -SafeLinksRuleParams $PSBoundParameters
if ($SafeLinksRuleParams.SafeLinksPolicy -ne $SafeLinksRule.SafeLinksPolicy)
{
Set-EXOSafeLinksRule -SafeLinksRuleParams $SafeLinksRuleParams
}
else
{
$SafeLinksRuleParams.Remove('SafeLinksPolicy')
Set-EXOSafeLinksRule -SafeLinksRuleParams $SafeLinksRuleParams
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class MSFT_EXOTransportRule : OMI_BaseResource
[Write, Description("The ExceptIfSenderADAttributeContainsWords parameter specifies an exception that looks for words in Active Directory attributes of message senders.")] String ExceptIfSenderADAttributeContainsWords[];
[Write, Description("The ExceptIfSenderADAttributeMatchesPatterns parameter specifies an exception that looks for text patterns in Active Directory attributes of message senders by using regular expressions.")] String ExceptIfSenderADAttributeMatchesPatterns[];
[Write, Description("The ExceptIfSenderDomainIs parameter specifies an exception that looks for senders with email address in the specified domains.")] String ExceptIfSenderDomainIs[];
[Write, Description("This parameter is reserved for internal Microsoft use.")] String ExceptIfSenderInRecipientList;
[Write, Description("This parameter is reserved for internal Microsoft use.")] String ExceptIfSenderInRecipientList[];
[Write, Description("The ExceptIfSenderIpRanges parameter specifies an exception that looks for senders whose IP addresses matches the specified value, or fall within the specified ranges.")] String ExceptIfSenderIpRanges[];
[Write, Description("The ExceptIfSenderManagementRelationship parameter specifies an exception that looks for the relationship between the sender and recipients in messages."), ValueMap{"Manager","DirectReport"}, Values{"Manager","DirectReport"}] String ExceptIfSenderManagementRelationship;
[Write, Description("The ExceptIfSentTo parameter specifies an exception that looks for recipients in messages. You can use any value that uniquely identifies the recipient.")] String ExceptIfSentTo[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function Set-TargetResource
-FilterScript { ($_.deviceCompliancePolicyODataType) -eq 'microsoft.graph.androidCompliancePolicy' -and `
$_.displayName -eq $($DisplayName) }
Update-IntuneDeviceCompliancePolicy -ODataType 'microsoft.graph.androidCompliancePolicy' `
-deviceCompliancePolicyId $configDeviceAndroidPolicy.deviceCompliancePolicyId @PSBoundParameters
-deviceCompliancePolicyId $configDeviceAndroidPolicy.Id @PSBoundParameters
}
elseif ($Ensure -eq 'Absent' -and $currentDeviceAndroidPolicy.Ensure -eq 'Present')
{
Expand All @@ -422,7 +422,7 @@ function Set-TargetResource
-FilterScript { ($_.deviceCompliancePolicyODataType) -eq 'microsoft.graph.androidCompliancePolicy' -and `
$_.displayName -eq $($DisplayName) }

Remove-IntuneDeviceCompliancePolicy -deviceCompliancePolicyId $configDeviceAndroidPolicy.deviceCompliancePolicyId
Remove-IntuneDeviceCompliancePolicy -deviceCompliancePolicyId $configDeviceAndroidPolicy.Id
}
}

Expand Down
Loading