Skip to content

Commit

Permalink
Allow null as parameter when converting Intune assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienTschanz committed Jun 15, 2024
1 parent 13357cd commit 7c73b19
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1200,12 +1200,18 @@ function ConvertTo-IntunePolicyAssignment
[OutputType([Hashtable[]])]
param (
[Parameter(Mandatory = $true)]
[AllowNull()]
$Assignments,
[Parameter()]
[System.Boolean]
$IncludeDeviceFilter = $true
)

if ($null -eq $Assignments)
{
return ,@()
}

$assignmentResult = @()
foreach ($assignment in $Assignments)
{
Expand Down

0 comments on commit 7c73b19

Please sign in to comment.