21 lines
593 B
PowerShell
21 lines
593 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 -GroupCategory Security -GroupScope Global
|
|
New-ADGroup -Path $ACL -Server $Server -Name $Write -GroupCategory Security -GroupScope Global
|
|
} else {
|
|
New-ADGroup -Path $ACL -Name $Read -GroupCategory Security -GroupScope Global
|
|
New-ADGroup -Path $ACL -Name $Write -GroupCategory Security -GroupScope Global
|
|
}
|