什么`?{}`代表PowerShell

Bla*_*rai 0 .net windows powershell

我有以下表达式PowerShell:

$oneTypes = Get-ChildItem -Path $Location -Directory


$onlyCompile = @( $BASE_A, $BASE_B, $BASE_C )
#trying figure this line  out
$oneTypes = ($oneTypes | ?{$onlyCompile -contains $_})
Run Code Online (Sandbox Code Playgroud)

我不知道是什么?,并{...}在这里做?看起来它可能是一个脚本块,但我不确定.我也想知道管道是如何发挥作用的.

Mit*_*tul 5

?用作Where-Object命令的简短形式,这里它意味着过滤所提供数组中的所有对象$onlycompile