Skip to content

Commit

Permalink
Merge pull request #5432 from NikCharlebois/SCPolicyConfig---Fixes
Browse files Browse the repository at this point in the history
SCPolicyConfig - Fixes Extracting Empty Groups
  • Loading branch information
NikCharlebois authored Nov 20, 2024
2 parents ba9e95d + 2c38699 commit f48cfb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
* Initial release.
* IntuneFirewallRulesHyperVPolicyWindows10
* Initial release.
* SCPolicyConfig
* Fixed an issue extracting empty groups properties.
* TeamsUpdateManagementPolicy
* Added conversion of the UpdateTimeOfDay parameter to the local culture format
so that the comparison will work consistently.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1287,12 +1287,12 @@ function Export-TargetResource
$Results.BusinessJustificationList = ConvertTo-BusinessJustificationListString -ObjectHash $Results.BusinessJustificationList
}

if ($null -ne $Results.DLPAppGroups)
if ($null -ne $Results.DLPAppGroups -and $Results.DLPAppGroups.Length -gt 0)
{
$Results.DLPAppGroups = ConvertTo-DLPAppGroupsString -ObjectHash $Results.DLPAppGroups
}

if ($null -ne $Results.DLPNetworkShareGroups)
if ($null -ne $Results.DLPNetworkShareGroups -and $Results.DLPNetworkShareGroups.Length -gt 0)
{
$Results.DLPNetworkShareGroups = ConvertTo-DLPNetworkShareGroupsString -ObjectHash $Results.DLPNetworkShareGroups
}
Expand All @@ -1302,7 +1302,7 @@ function Export-TargetResource
$Results.DLPPrinterGroups = ConvertTo-DLPPrinterGroupsString -ObjectHash $Results.DLPPrinterGroups
}

if ($null -ne $Results.DLPRemovableMediaGroups)
if ($null -ne $Results.DLPRemovableMediaGroups -and $Results.DLPRemovableMediaGroups.Length -gt 0)
{
$Results.DLPRemovableMediaGroups = ConvertTo-DLPRemovableMediaGroupsString -ObjectHash $Results.DLPRemovableMediaGroups
}
Expand All @@ -1312,7 +1312,7 @@ function Export-TargetResource
$Results.EvidenceStoreSettings = ConvertTo-EvidenceStoreSettingsString -ObjectHash $Results.EvidenceStoreSettings
}

if ($null -ne $Results.SiteGroups)
if ($null -ne $Results.SiteGroups -and $Results.SiteGroups.Length -gt 0)
{
$Results.SiteGroups = ConvertTo-SiteGroupsString -ObjectHash $Results.SiteGroups
}
Expand Down

0 comments on commit f48cfb2

Please sign in to comment.