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