[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 -GroupCategory Security -GroupScope Global New-ADGroup -Path $Roles -Server $Server -Name $Write -GroupCategory Security -GroupScope Global } else { New-ADGroup -Path $Roles -Name $Read -GroupCategory Security -GroupScope Global New-ADGroup -Path $Roles -Name $Write -GroupCategory Security -GroupScope Global }