zettelkasten/Eingang/where-filter.md
Ralf Koop 2cec4e795e .
2024-01-11 08:09:39 +01:00

468 B
Raw Blame History

Abfrage where nach einer Liste filtern

Mittwoch, 10. Januar 2024 16:32

You can then read in this file as array with

$list= Get-Content -Path ""

Next combine this list to build the pattern like

$pattern= (($list| ForEach-Object {[regex]::Escape($_)}) join"|") and do

Get-AppxPackage | Where-Object {$_.name -notmatch $pattern}

Aus https://stackoverflow.com/questions/52152228/how-to-filter-a-list-with-a-list-of-strings-in-powershell