ProjectManagementScripts/AddProjectACL.ps1

24 lines
647 B
PowerShell
Raw Normal View History

[CmdletBinding()]
param (
[string]
$ProjectName,
[string]
$Server
)
. .\Variables.ps1
$Read = 'ACL-'+$ProjectName+'-RO'
$Write = 'ACL-'+$ProjectName+'-RW'
$ret=@()
if($PSBoundParameters.ContainsKey("Server")){
$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
} else {
$ret += New-ADGroup -Path $ACL -Name $Read -GroupCategory Security -GroupScope Global
$ret += New-ADGroup -Path $ACL -Name $Write -GroupCategory Security -GroupScope Global
}
return $ret