ProjectManagementScripts/AddProjectACL.ps1

21 lines
593 B
PowerShell
Raw Normal View History

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