ProjectManagementScripts/AddProjectRoles.ps1

20 lines
598 B
PowerShell
Raw Normal View History

[CmdletBinding()]
param (
[string]
$ProjectName,
[string]
$Server
)
. .\Variables.ps1
$Read = 'GR-'+$ProjectName+'-RO'
$Write = 'GR-'+$ProjectName+'-RW'
if($PSBoundParameters.ContainsKey("Server")){
2024-07-14 14:10:28 +02:00
New-ADGroup -Path $Roles -Server $Server -Name $Read -GroupCategory Security -GroupScope Global
New-ADGroup -Path $Roles -Server $Server -Name $Write -GroupCategory Security -GroupScope Global
} else {
2024-07-14 14:10:28 +02:00
New-ADGroup -Path $Roles -Name $Read -GroupCategory Security -GroupScope Global
New-ADGroup -Path $Roles -Name $Write -GroupCategory Security -GroupScope Global
}