function Select-AlkamiWebServers { <# .SYNOPSIS Filters Web servers from a list of servers by hostname convention. #> [CmdletBinding()] Param( [AllowNull()] [AllowEmptyCollection()] [Parameter(Mandatory=$true)] [string[]]$Servers ) $result = ($Servers -match "\b(WEB|ALK-PLA1-QW)") if ($result -eq $false) { return $null } return $result }