2024-07-14 14:01:22 +02:00
|
|
|
[CmdletBinding()]
|
|
|
|
param (
|
|
|
|
[string]
|
|
|
|
$ProjectName,
|
|
|
|
[string]
|
|
|
|
$Server
|
|
|
|
)
|
|
|
|
|
|
|
|
. .\Variables.ps1
|
|
|
|
|
|
|
|
$Read = 'ACL-'+$ProjectName+'-RO'
|
|
|
|
$Write = 'ACL-'+$ProjectName+'-RW'
|
|
|
|
|
2024-07-14 14:26:26 +02:00
|
|
|
$ret=@()
|
|
|
|
|
2024-07-14 14:01:22 +02:00
|
|
|
if($PSBoundParameters.ContainsKey("Server")){
|
2024-07-14 14:26:26 +02:00
|
|
|
$ret += New-ADGroup -Path $ACL -Server $Server -Name $Read -GroupCategory Security -GroupScope Global
|
|
|
|
$ret += New-ADGroup -Path $ACL -Server $Server -Name $Write -GroupCategory Security -GroupScope Global
|
2024-07-14 14:01:22 +02:00
|
|
|
} else {
|
2024-07-14 14:26:26 +02:00
|
|
|
$ret += New-ADGroup -Path $ACL -Name $Read -GroupCategory Security -GroupScope Global
|
|
|
|
$ret += New-ADGroup -Path $ACL -Name $Write -GroupCategory Security -GroupScope Global
|
2024-07-14 14:01:22 +02:00
|
|
|
}
|
2024-07-14 14:26:26 +02:00
|
|
|
|
|
|
|
return $ret
|