ProjectManagementScripts/AddProjectACL.ps1
2024-07-14 14:01:22 +02:00

21 lines
421 B
PowerShell

[CmdletBinding()]
param (
[string]
$ProjectName,
[string]
$Server
)
. .\Variables.ps1
$Read = 'ACL-'+$ProjectName+'-RO'
$Write = 'ACL-'+$ProjectName+'-RW'
if($PSBoundParameters.ContainsKey("Server")){
New-ADGroup -Path $ACL -Server $Server -Name $Read
New-ADGroup -Path $ACL -Server $Server -Name $Write
} else {
New-ADGroup -Path $ACL -Name $Read
New-ADGroup -Path $ACL -Name $Write
}