[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 }