added check for project name being set
This commit is contained in:
parent
8da7314da8
commit
239c66befc
@ -13,12 +13,15 @@ $Write = 'ACL-'+$ProjectName+'-RW'
|
|||||||
|
|
||||||
$ret=@()
|
$ret=@()
|
||||||
|
|
||||||
if($PSBoundParameters.ContainsKey("Server")){
|
if($PSBoundParameters.ContainsKey("ProjectName")){
|
||||||
$ret += New-ADGroup -Path $ACL -Server $Server -Name $Read -GroupCategory Security -GroupScope Global
|
if($PSBoundParameters.ContainsKey("Server")){
|
||||||
$ret += New-ADGroup -Path $ACL -Server $Server -Name $Write -GroupCategory Security -GroupScope Global
|
$ret += New-ADGroup -Path $ACL -Server $Server -Name $Read -GroupCategory Security -GroupScope Global
|
||||||
} else {
|
$ret += New-ADGroup -Path $ACL -Server $Server -Name $Write -GroupCategory Security -GroupScope Global
|
||||||
$ret += New-ADGroup -Path $ACL -Name $Read -GroupCategory Security -GroupScope Global
|
} else {
|
||||||
$ret += New-ADGroup -Path $ACL -Name $Write -GroupCategory Security -GroupScope Global
|
$ret += New-ADGroup -Path $ACL -Name $Read -GroupCategory Security -GroupScope Global
|
||||||
|
$ret += New-ADGroup -Path $ACL -Name $Write -GroupCategory Security -GroupScope Global
|
||||||
|
}
|
||||||
|
return $ret
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret
|
throw "ProjectName parameter needs to be set"
|
Loading…
Reference in New Issue
Block a user