Skip to content

Commit

Permalink
Merge pull request #3886 from William-Francillette/fix3851
Browse files Browse the repository at this point in the history
PR: IntuneDeviceConfigurationEndpointProtectionPolicyWindows10 - Fixes 3851
  • Loading branch information
NikCharlebois authored Nov 13, 2023
2 parents 606123d + bfbcdb4 commit 9e7005b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# UNRELEASED

* IntuneDeviceConfigurationEndpointProtectionPolicyWindows10
* fix an issue where the firewall settings were not populate correctly
FIXES [#3851](https://github.com/microsoft/Microsoft365DSC/issues/3851)
* AADRoleEligibilityScheduleRequest
* Fixed incorrect subclass MSFT_AADRoleEligibilityScheduleRequestScheduleRecurrenceRange for range property
FIXES [#3847](https://github.com/microsoft/Microsoft365DSC/issues/3847)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1287,36 +1287,36 @@ function Get-TargetResource
foreach ($currentfirewallRules in $getValue.AdditionalProperties.firewallRules)
{
$myfirewallRules = @{}
if ($null -ne $getValue.AdditionalProperties.firewallRules.action)
if ($null -ne $currentfirewallRules.action)
{
$myfirewallRules.Add('Action', $getValue.AdditionalProperties.firewallRules.action.toString())
$myfirewallRules.Add('Action', $currentfirewallRules.action.toString())
}
$myfirewallRules.Add('Description', $getValue.AdditionalProperties.firewallRules.description)
$myfirewallRules.Add('DisplayName', $getValue.AdditionalProperties.firewallRules.displayName)
if ($null -ne $getValue.AdditionalProperties.firewallRules.edgeTraversal)
$myfirewallRules.Add('Description', $currentfirewallRules.description)
$myfirewallRules.Add('DisplayName', $currentfirewallRules.displayName)
if ($null -ne $currentfirewallRules.edgeTraversal)
{
$myfirewallRules.Add('EdgeTraversal', $getValue.AdditionalProperties.firewallRules.edgeTraversal.toString())
$myfirewallRules.Add('EdgeTraversal', $currentfirewallRules.edgeTraversal.toString())
}
$myfirewallRules.Add('FilePath', $getValue.AdditionalProperties.firewallRules.filePath)
if ($null -ne $getValue.AdditionalProperties.firewallRules.interfaceTypes)
$myfirewallRules.Add('FilePath', $currentfirewallRules.filePath)
if ($null -ne $currentfirewallRules.interfaceTypes)
{
$myfirewallRules.Add('InterfaceTypes', $getValue.AdditionalProperties.firewallRules.interfaceTypes.toString())
$myfirewallRules.Add('InterfaceTypes', $currentfirewallRules.interfaceTypes.toString())
}
$myfirewallRules.Add('LocalAddressRanges', $getValue.AdditionalProperties.firewallRules.localAddressRanges)
$myfirewallRules.Add('LocalPortRanges', $getValue.AdditionalProperties.firewallRules.localPortRanges)
$myfirewallRules.Add('LocalUserAuthorizations', $getValue.AdditionalProperties.firewallRules.localUserAuthorizations)
$myfirewallRules.Add('PackageFamilyName', $getValue.AdditionalProperties.firewallRules.packageFamilyName)
if ($null -ne $getValue.AdditionalProperties.firewallRules.profileTypes)
$myfirewallRules.Add('LocalAddressRanges', $currentfirewallRules.localAddressRanges)
$myfirewallRules.Add('LocalPortRanges', $currentfirewallRules.localPortRanges)
$myfirewallRules.Add('LocalUserAuthorizations', $currentfirewallRules.localUserAuthorizations)
$myfirewallRules.Add('PackageFamilyName', $currentfirewallRules.packageFamilyName)
if ($null -ne $currentfirewallRules.profileTypes)
{
$myfirewallRules.Add('ProfileTypes', $getValue.AdditionalProperties.firewallRules.profileTypes.toString())
$myfirewallRules.Add('ProfileTypes', $currentfirewallRules.profileTypes.toString())
}
$myfirewallRules.Add('Protocol', $getValue.AdditionalProperties.firewallRules.protocol)
$myfirewallRules.Add('RemoteAddressRanges', $getValue.AdditionalProperties.firewallRules.remoteAddressRanges)
$myfirewallRules.Add('RemotePortRanges', $getValue.AdditionalProperties.firewallRules.remotePortRanges)
$myfirewallRules.Add('ServiceName', $getValue.AdditionalProperties.firewallRules.serviceName)
if ($null -ne $getValue.AdditionalProperties.firewallRules.trafficDirection)
$myfirewallRules.Add('Protocol', $currentfirewallRules.protocol)
$myfirewallRules.Add('RemoteAddressRanges', $currentfirewallRules.remoteAddressRanges)
$myfirewallRules.Add('RemotePortRanges', $currentfirewallRules.remotePortRanges)
$myfirewallRules.Add('ServiceName', $currentfirewallRules.serviceName)
if ($null -ne $currentfirewallRules.trafficDirection)
{
$myfirewallRules.Add('TrafficDirection', $getValue.AdditionalProperties.firewallRules.trafficDirection.toString())
$myfirewallRules.Add('TrafficDirection', $currentfirewallRules.trafficDirection.toString())
}
if ($myfirewallRules.values.Where({ $null -ne $_ }).count -gt 0)
{
Expand Down Expand Up @@ -4842,6 +4842,7 @@ function Test-TargetResource
}
}

$ValuesToCheck.Remove('Id') | Out-Null
$ValuesToCheck.Remove('Credential') | Out-Null
$ValuesToCheck.Remove('ApplicationId') | Out-Null
$ValuesToCheck.Remove('TenantId') | Out-Null
Expand Down

0 comments on commit 9e7005b

Please sign in to comment.