ProjectManagementScripts/AddProjectACL.ps1

21 lines
421 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")){
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
}