18 lines
407 B
PowerShell
18 lines
407 B
PowerShell
[CmdletBinding()]
|
|
param (
|
|
[string]
|
|
$Server
|
|
)
|
|
|
|
$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.*" |