2024-07-14 14:01:22 +02:00
|
|
|
[CmdletBinding()]
|
|
|
|
param (
|
|
|
|
[string]
|
|
|
|
$ProjectName,
|
|
|
|
[string]
|
|
|
|
$Server
|
|
|
|
)
|
|
|
|
|
|
|
|
. .\Variables.ps1
|
|
|
|
|
|
|
|
if($PSBoundParameters.ContainsKey("Server")){
|
2024-07-14 14:11:19 +02:00
|
|
|
New-ADGroup -Path $Projects -Server $Server -Name $ProjectName -GroupCategory Security -GroupScope Global
|
2024-07-14 14:01:22 +02:00
|
|
|
. .\AddProjectACL.ps1 -ProjectName $ProjectName -Server $Server
|
|
|
|
. .\AddProjectRoles.ps1 -ProjectName $ProjectName -Server $Server
|
|
|
|
} else {
|
|
|
|
|
2024-07-14 14:11:19 +02:00
|
|
|
New-ADGroup -Path $Projects -Name $ProjectName -GroupCategory Security -GroupScope Global
|
2024-07-14 14:01:22 +02:00
|
|
|
. .\AddProjectACL.ps1 -ProjectName $ProjectName
|
|
|
|
. .\AddProjectRoles.ps1 -ProjectName $ProjectName
|
|
|
|
}
|