now searchin with eq

This commit is contained in:
Karl-Wilfried Zimmer 2024-07-15 21:42:26 +02:00
parent 93fc00b4c7
commit 3f0cba6cd7
2 changed files with 2 additions and 8 deletions

View File

@ -14,10 +14,7 @@ if($PSBoundParameters.ContainsKey("Server")){
} }
if($PSBoundParameters.ContainsKey("ProjectName")){ if($PSBoundParameters.ContainsKey("ProjectName")){
$Projects = $Projects | Where-Object Name -Match $ProjectName $Projects = $Projects | Where-Object Name -eq $ProjectName
if($ProjectName.Count -ge 1){
$Projects=$Projects[0]
}
} }
return $Projects | Get-ADGroupMember | Where-Object Name -Match "ACL.*" return $Projects | Get-ADGroupMember | Where-Object Name -Match "ACL.*"

View File

@ -21,10 +21,7 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
} }
} }
if($PSBoundParameters.ContainsKey("ProjectName")){ if($PSBoundParameters.ContainsKey("ProjectName")){
$Projects = $Projects | Where-Object Name -Match $ProjectName $Projects = $Projects | Where-Object Name -eq $ProjectName
if($ProjectName.Count -ge 1){
$Projects=$Projects[0]
}
} }
return $Projects | Get-ADGroupMember | Where-Object Name -Match "GR.*" return $Projects | Get-ADGroupMember | Where-Object Name -Match "GR.*"