ProjectManagementScripts/GetRoles.ps1
Karl-Wilfried Zimmer 32e5c19230 snap
2024-07-14 19:39:45 +02:00

20 lines
438 B
PowerShell

[CmdletBinding()]
param (
[string]
$Server,
[string]
$ProjectName
)
$Projects=$null
if($PSBoundParameters.ContainsKey("Server")){
$Projects = . .\GetProjects.ps1 -Server $Server
} else {
$Projects = . .\GetProjects.ps1
}
if($PSBoundParameters.ContainsKey("ProjectName")){
$Projects = $Projects | Where-Object Name -Match $ProjectName
}
return $Projects | Get-ADGroupMember | Where-Object Name -Match "GR.*"