made to use eq

This commit is contained in:
Karl-Wilfried Zimmer 2024-07-15 22:04:16 +02:00
parent 13efc345c3
commit 71ae6260f6

View File

@ -10,9 +10,9 @@ param (
if($PSBoundParameters.ContainsKey('Name')){
$Roles=$null
if($PSBoundParameters.ContainsKey('Server')){
$Roles = . .\GetRoles.ps1 -Server $Server | Where-Object Name -Match $Name
$Roles = . .\GetRoles.ps1 -Server $Server | Where-Object Name -eq $Name
} else {
$Roles = . .\GetRoles.ps1 | Where-Object Name -Match $Name
$Roles = . .\GetRoles.ps1 | Where-Object Name -eq $Name
}
return $Roles | Get-ADGroupMember | Get-Unique
}