ProjectManagementScripts/GetRoles.ps1
Karl-Wilfried Zimmer 3f0cba6cd7 now searchin with eq
2024-07-15 21:42:26 +02:00

27 lines
681 B
PowerShell

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