added check for project name being set
This commit is contained in:
parent
3dfa7a0e58
commit
81dba8289b
@ -12,6 +12,7 @@ $ret
|
||||
$acl
|
||||
$r
|
||||
|
||||
if($PSBoundParameters.ContainsKey($ProjectName)){
|
||||
if($PSBoundParameters.ContainsKey("Server")){
|
||||
$ret = New-ADGroup -Path $Projects -Server $Server -Name $ProjectName -GroupCategory Security -GroupScope Global
|
||||
$acl = . .\AddProjectACL.ps1 -ProjectName $ProjectName -Server $Server
|
||||
@ -30,4 +31,7 @@ if($PSBoundParameters.ContainsKey("Server")){
|
||||
}
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
||||
throw "ProjectName parameter needs to be set"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user