[CmdletBinding()] param ( [string] $Server ) . .\Variables.ps1 if($PSBoundParameters.ContainsKey("Server")){ Get-ADGroup -Server $Server -SearchBase $Projects -Filter 'GroupCategory -eq "Security"' } else { Get-ADGroup -SearchBase $Projects -Filter 'GroupCategory -eq "Security"' }