23 lines
511 B
PowerShell
23 lines
511 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
|
|
if($ProjectName.Count -ge 1){
|
|
$Projects=$Projects[0]
|
|
}
|
|
}
|
|
|
|
return $Projects | Get-ADGroupMember | Where-Object Name -Match "ACL.*" |