From 8da7314da807989ec799cfc1a0fd79cd3f4f65ee Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Sun, 14 Jul 2024 14:47:01 +0200 Subject: [PATCH] added check for project name being set --- NewProject.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewProject.ps1 b/NewProject.ps1 index 4d7de9d..d5c6cf0 100644 --- a/NewProject.ps1 +++ b/NewProject.ps1 @@ -12,7 +12,7 @@ $ret $acl $r -if($PSBoundParameters.ContainsKey($ProjectName)){ +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