logo
  • 教程列表
  • SO官方文檔
  • 基本集合操作
    • 過濾 Where-Object 在哪裡
    • 訂購排序物件排序
    • 分組組物件組
    • 投影選擇物件選擇
  1. StackOverflow 文件
  2. PowerShell 教程
  3. 基本集合操作
  4. 過濾 Where-Object 在哪裡

過濾 Where-Object 在哪裡

Created: November-22, 2018

使用條件表示式篩選列舉

別名:

Where-Object
where
?

例:

$names = @( "Aaron", "Albert", "Alphonse","Bernie", "Charlie", "Danny", "Ernie", "Frank")

$names | Where-Object { $_ -like "A*" }
$names | where { $_ -like "A*" }
$names | ? { $_ -like "A*" }

返回:

Aaron
Albert
Alphonse

  • 訂購排序物件排序
  • 基本集合操作

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明