ProjectManagementScripts/AddProjectRoles.ps1
2024-07-14 14:01:22 +02:00

20 lines
426 B
PowerShell

[CmdletBinding()]
param (
[string]
$ProjectName,
[string]
$Server
)
. .\Variables.ps1
$Read = 'GR-'+$ProjectName+'-RO'
$Write = 'GR-'+$ProjectName+'-RW'
if($PSBoundParameters.ContainsKey("Server")){
New-ADGroup -Path $Roles -Server $Server -Name $Read
New-ADGroup -Path $Roles -Server $Server -Name $Write
} else {
New-ADGroup -Path $Roles -Name $Read
New-ADGroup -Path $Roles -Name $Write
}