About 45,800 results
Open links in new tab
  1. Multiple -and -or in PowerShell Where-Object statement

    77 By wrapping your comparisons in {} in your first example you are creating ScriptBlocks; so the PowerShell interpreter views it as Where-Object { <ScriptBlock> -and <ScriptBlock> }. Since …

  2. How to use Powershell Where-Object like an IN statement

    How to use Powershell Where-Object like an IN statement Asked 14 years, 3 months ago Modified 3 years, 9 months ago Viewed 28k times

  3. Filtering output using "Where-Object" in Powershell

    Feb 11, 2016 · I'm trying to get into PowerShell and have encountered my first hurdle. when I run Get-Command | Where-Object CommandType -contains Cmdlet My output gets filtered so …

  4. How to filter objects using -notcontains in Powershell

    Dec 23, 2021 · I'm trying to filter objects that don't contain the string &quot;C: \\ Windows&quot; in their path but the filtering isn't working well with $_.PathName parameter. function …

  5. powershell - Apply Where-Object shorthand operators to entire …

    Apr 23, 2025 · The question is explicitly about how to apply a Where-Object call to the input objects themselves rather than one of their properties, using simplified syntax.

  6. PowerShell Where-Object $_.name -like -in $list - Stack Overflow

    Jun 16, 2015 · I am trying to figure out a way to use both the -like and -in parameters with the Where-Object cmdlet in order to match the full program entry name (e.g. …

  7. powershell - Where-Object, Select-Object and ForEach-object ...

    Jun 4, 2019 · Where-Object, Select-Object and ForEach-Object I am a PowerShell beginner. I don't understand too much. Can someone give examples to illustrate the differences and …

  8. PowerShell Where-Object vs. Where method - Stack Overflow

    The (PowerShell v4+) .Where() method, which is evaluated in expression mode, always returns an instance of [System.Collections.ObjectModel.Collection[psobject]]: If no input objects …

  9. Powershell: where {_.Name not in $object} - Stack Overflow

    May 22, 2012 · Of course I can loop all results 1 by 1, but is there a simple way to exclude the systems directly from the results? I've got a feeling it's possible with select-object or where …

  10. PowerShell How to use -and in Where-Object - Stack Overflow

    May 26, 2019 · PowerShell How to use -and in Where-Object Asked 6 years, 6 months ago Modified 6 years, 6 months ago Viewed 6k times