From cf0aac2244a1f3f4f080c12153684463908067e5 Mon Sep 17 00:00:00 2001 From: Ricardo Marramaque Date: Fri, 2 Mar 2018 13:07:20 +0000 Subject: [PATCH] Update Test-LDAP.ps1 If you just want to test a connection, why do FindAll ? --- ActiveDirectory/Test-LDAP.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActiveDirectory/Test-LDAP.ps1 b/ActiveDirectory/Test-LDAP.ps1 index 4037462..c52efed 100644 --- a/ActiveDirectory/Test-LDAP.ps1 +++ b/ActiveDirectory/Test-LDAP.ps1 @@ -68,7 +68,7 @@ } try { Write-Verbose ('$($MyInvocation.MyCommand): Trying to LDAP bind - {0}' -f $server) - $adObjects = $searcher.FindAll() + $adObjects = $searcher.FindOne() Write-Verbose ('$($MyInvocation.MyCommand): LDAP Server {0} is up (object path = {1})' -f $server, $adObjects.Item(0).Path) $result.Connected = $true }