21 lines
421 B
PowerShell
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
|
||
|
}
|