Skip to content

Commit

Permalink
Fixed: Parameter Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannappel, Christoph committed Mar 31, 2022
1 parent f8be73a commit 290d64d
Showing 1 changed file with 19 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,24 +365,24 @@ function Test-TargetResource
Write-Verbose -Message "Test-TargetResource returned false"
return $false
}
#if ($searchADDomain.ContainsKey('CustomFilter') -and $searchADDomain.CustomFilter -ne $specifiedDomain.CustomFilter)
#{
# $message = "Current CustomFilter Property of SearchActiveDirectoryDomain $searchADDomain does not match the desired state."
# Write-Verbose -Message $message
# Add-SPDscEvent -Message $message -EntryType 'Error' -EventID 1 -Source $MyInvocation.MyCommand.Source
#
# Write-Verbose -Message "Test-TargetResource returned false"
# return $false
#}
#if ($searchADDomain.ContainsKey('ShortDomainName') -and $searchADDomain.ShortDomainName -ne $specifiedDomain.ShortDomainName)
#{
# $message = "Current ShortDomainName Property of SearchActiveDirectoryDomain $searchADDomain does not match the desired state."
# Write-Verbose -Message $message
# Add-SPDscEvent -Message $message -EntryType 'Error' -EventID 1 -Source $MyInvocation.MyCommand.Source
#
# Write-Verbose -Message "Test-TargetResource returned false"
# return $false
#}
if ($searchADDomain.ContainsKey('CustomFilter') -and $searchADDomain.CustomFilter -ne $specifiedDomain.CustomFilter)
{
$message = "Current CustomFilter Property of SearchActiveDirectoryDomain $searchADDomain does not match the desired state."
Write-Verbose -Message $message
Add-SPDscEvent -Message $message -EntryType 'Error' -EventID 1 -Source $MyInvocation.MyCommand.Source

Write-Verbose -Message "Test-TargetResource returned false"
return $false
}
if ($searchADDomain.ContainsKey('ShortDomainName') -and $searchADDomain.ShortDomainName -ne $specifiedDomain.ShortDomainName)
{
$message = "Current ShortDomainName Property of SearchActiveDirectoryDomain $searchADDomain does not match the desired state."
Write-Verbose -Message $message
Add-SPDscEvent -Message $message -EntryType 'Error' -EventID 1 -Source $MyInvocation.MyCommand.Source

Write-Verbose -Message "Test-TargetResource returned false"
return $false
}
}
}

Expand All @@ -393,9 +393,7 @@ function Test-TargetResource
"ActiveDirectoryCustomQuery",
"ActiveDirectorySearchTimeout",
"OnlySearchWithinSiteCollection",
"PeopleEditorOnlyResolveWithinSiteCollection",
"CustomFilter",
"ShortDomainName")
"PeopleEditorOnlyResolveWithinSiteCollection")

Write-Verbose -Message "Test-TargetResource returned $result"

Expand Down

0 comments on commit 290d64d

Please sign in to comment.