if($Name-and-not$HasWildCard){# torn between independent queries, or filtering channels.list# submit a PR if this isn't performant enough or doesn't make sense.$Channels=$RawChannels.channels|Where-Object{$Name-Contains$_.name}}elseif($Name-and$HasWildCard){$AllChannels=$RawChannels.Channels# allow like operator on each channel requested in the param, avoid dupes$ChannelHash=[ordered]@{}foreach($SlackChannelin$AllChannels){foreach($Chanin$Name){if($SlackChannel.Name-like$Chan-and-not$ChannelHash.Contains($SlackChannel.id)){$ChannelHash.Add($SlackChannel.Id,$SlackChannel)}}}$Channels=$ChannelHash.Values}else# nothing specified{$Channels=$RawChannels.channels}