This commit is contained in:
Karl-Wilfried Zimmer 2024-07-14 13:30:12 +02:00
parent d508ea6730
commit a9e9495f8a

View File

@ -2,18 +2,21 @@
[CmdletBinding()] [CmdletBinding()]
param ( param (
[string] [string]
$Name $Name,
[string]
$Server
) )
if($PSBoundParameters.ContainsKey('Name')){ if($PSBoundParameters.ContainsKey('Name')){
. .\Variables.ps1
$Read='GR-'+$Name+'-RO' $Read='GR-'+$Name+'-RO'
$Write='GR-'+$Name+'-RW' $Write='GR-'+$Name+'-RW'
Write-Host $Read+$Roles $Roles
Write-Host $Write+$Roles if($PSBoundParameters.ContainsKey('Server')){
$ReadUsers=Get-ADGroupMember -Recursive -Identity $Read $Roles = . .\GetRoles.ps1 -Server $Server | Where-Object Name -Match $Name
$WriteUsers } else {
Return $null $Roles = . .\GetRoles.ps1 | Where-Object Name -Match $Name
}
return $Users = $Roles | Get-ADGroupMember | Get-Unique
} }
throw "No such Project was found" throw "No such Project was found"