ProjectManagementScripts/GetProjectUsers.ps1
Karl-Wilfried Zimmer 96721a0435 reversed eq
2024-07-15 22:15:38 +02:00

20 lines
474 B
PowerShell

# Parameter help description
[CmdletBinding()]
param (
[string]
$Name,
[string]
$Server
)
if($PSBoundParameters.ContainsKey('Name')){
$Roles=$null
if($PSBoundParameters.ContainsKey('Server')){
$Roles = . .\GetRoles.ps1 -Server $Server | Where-Object Name -Match $Name
} else {
$Roles = . .\GetRoles.ps1 | Where-Object Name -Match $Name
}
return $Roles | Get-ADGroupMember | Get-Unique
}
throw "No such Project was found"