removed error

This commit is contained in:
Karl-Wilfried Zimmer 2024-07-15 22:49:55 +02:00
parent 6f82577c39
commit 5712ca72c8

View File

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