About 711,000 results
Open links in new tab
  1. powershell - -contains or -match several values - Stack Overflow

    Sep 27, 2017 · Use a nested Where-Object filter and the String.Contains() method: ... | Where-Object { $f = $_.FullName $filterArray | Where-Object { $f.Contains($_) } } Share

  2. Powershell Filter Array: A Simple Guide to Mastery

    In PowerShell, you can filter an array by using the `Where-Object` cmdlet to specify a condition that elements must meet. Here's an example code snippet that filters an array of numbers to …

  3. Filtering with PowerShell Where-Object: Easy Examples

    Oct 10, 2022 · In this article, I’ll explain how to use the PowerShell Where-Object cmdlet to filter objects and data. I’ll provide a series of easy examples showing you how to filter files by name …

  4. How to Filter Array of Objects in PowerShell? - SPGuides

    Feb 3, 2024 · To filter an array of objects in PowerShell, you can use the Where-Object cmdlet, which allows you to specify conditions for filtering. For example, $array | Where-Object { …

  5. How to Filter Data Using Where-Object | PowerShell - NinjaOne

    Mar 31, 2025 · Data filtering using PowerShell Where-Object lets you display relevant information from cmdlets, search for files and processes, and sort through results from any PowerShell …

  6. PowerShell Filter Operators [With Examples]

    Aug 3, 2024 · PowerShell filter operators are used to compare values or filter elements of a collection against an input value. Filter operators can be used with cmdlets like Where-Object …

  7. PowerShell command to filter records with multiple values

    Dec 25, 2018 · But I want to filter records with multiple values of description like "school", "college", etc. How will this be possible? You could use an -or statement: Or you could create …

  8. Where-Object vs. the Where method: Array filtering in PowerShell

    Mar 7, 2017 · The Where-Object cmdlet and the Where method both allow you to filter arrays in PowerShell. In this post, you will learn the difference between the two filters.

  9. Calling a variable with -Filter in Powershell - Microsoft Q&A

    Nov 21, 2022 · This works: Get-CsOnlineUser -Filter {LineURI -eq "tel:+12221234567"} | select UserPrincipalName,LineURI via import-csv or a foreach loop, I would like to call a variable so …

  10. Where-object with multiple value from a list : r/PowerShell - Reddit

    Instead of using -notlike, -notmatch is a better option here as it allows multiple values to be tested with regex while still ensuring the right-hand side operand is scalar. For example: $filter = …

Refresh