Skip to content

Commit

Permalink
Fixes #5179
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrola committed Oct 11, 2024
1 parent 5d82747 commit 422d565
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ function Get-TargetResource
try
{
Write-Verbose -Message "Getting Group with Id {$GroupId}"
$Group = Find-CsGroup -SearchQuery $GroupId -ExactMatchOnly $true -ErrorAction SilentlyContinue

if ($GroupId -match '\b[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}\b' -and $GroupId -ne '00000000-0000-0000-0000-000000000000'){
$Group = Find-CsGroup -SearchQuery $GroupId -ExactMatchOnly $true -ErrorAction SilentlyContinue
}
else {
$GroupId = $null
}
if ($null -eq $Group)
{
Write-Verbose -Message "Could not find Group with Id {$GroupId}, searching with DisplayName {$GroupDisplayName}"
Expand Down

0 comments on commit 422d565

Please sign in to comment.