20 lines
523 B
PowerShell
20 lines
523 B
PowerShell
|
[CmdletBinding()]
|
||
|
param (
|
||
|
[string]
|
||
|
$ProjectName,
|
||
|
[string]
|
||
|
$Server
|
||
|
)
|
||
|
|
||
|
. .\Variables.ps1
|
||
|
|
||
|
if($PSBoundParameters.ContainsKey("Server")){
|
||
|
New-ADGroup -Path $Projects -Server $Server -Name $ProjectName
|
||
|
. .\AddProjectACL.ps1 -ProjectName $ProjectName -Server $Server
|
||
|
. .\AddProjectRoles.ps1 -ProjectName $ProjectName -Server $Server
|
||
|
} else {
|
||
|
|
||
|
New-ADGroup -Path $Projects -Name $ProjectName
|
||
|
. .\AddProjectACL.ps1 -ProjectName $ProjectName
|
||
|
. .\AddProjectRoles.ps1 -ProjectName $ProjectName
|
||
|
}
|