Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois committed Dec 8, 2022
1 parent a7f2a4b commit dbd55cc
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,19 @@ function Set-TargetResource
Write-Verbose -Message "Retrieve team GroupId: $($team.GroupId)"

$CurrentParameters.Remove('TeamName') | Out-Null
$CurrentParameters.Add('GroupId', $team.GroupId)
$CurrentParameters.Remove('Credential') | Out-Null
$CurrentParameters.Remove('ApplicationId') | Out-Null
$CurrentParameters.Remove('TenantId') | Out-Null
$CurrentParameters.Remove('CertificateThumbprint') | Out-Null
$CurrentParameters.Remove('Ensure') | Out-Null
if ($CurrentParameters.ContainsKey('GroupId'))
{
$CurrentParameters.GroupId = $team.GroupId
}
else
{
$CurrentParameters.Add("GroupId", $team.GroupId)
}

if ($Ensure -eq 'Present')
{
Expand All @@ -240,6 +247,7 @@ function Set-TargetResource
$CurrentParameters.Remove('NewDisplayName')
}
Write-Verbose -Message "Creating team channel $DisplayName"
Write-Verbose -Message "Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentParameters)"
New-TeamChannel @CurrentParameters
}
}
Expand Down

0 comments on commit dbd55cc

Please sign in to comment.