2024-07-14 11:44:34 +02:00
|
|
|
# Parameter help description
|
|
|
|
[CmdletBinding()]
|
|
|
|
param (
|
|
|
|
[string]
|
2024-07-14 13:30:12 +02:00
|
|
|
$Name,
|
|
|
|
[string]
|
|
|
|
$Server
|
2024-07-14 11:44:34 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
if($PSBoundParameters.ContainsKey('Name')){
|
2024-07-14 16:57:49 +02:00
|
|
|
$Roles=$null
|
2024-07-14 13:30:12 +02:00
|
|
|
if($PSBoundParameters.ContainsKey('Server')){
|
2024-07-15 22:49:55 +02:00
|
|
|
$Roles = . .\GetRoles.ps1 -Server $Server -ProjectName $Name
|
2024-07-14 13:30:12 +02:00
|
|
|
} else {
|
2024-07-15 22:49:55 +02:00
|
|
|
$Roles = . .\GetRoles.ps1 -ProjectName $Name
|
2024-07-14 13:30:12 +02:00
|
|
|
}
|
2024-07-14 13:33:45 +02:00
|
|
|
return $Roles | Get-ADGroupMember | Get-Unique
|
2024-07-14 11:44:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
throw "No such Project was found"
|