r/PowerShell • • Jan 06 '26

Question Piping to Select-String does not work

I'm trying to use the following command to diagnose some dependency issues with my nascent C++ project:

 vcpkg depend-info qtbase | Select-String -Pattern "font"

This does literally nothing and I still see the entire output of vcpkg. I also tried piping to rg.exe (RipGrep) and the result is the same. AI failed me so here I come. Please at least point me in the right direction. Hate Powershell. Thanks.

0 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/vermyx Jan 07 '26

vcpkg is a CLI utility and is supposed to print its output back to the terminal, meaning stdout

Powershell has write-host vs write-output so your output doesn't potentially pollute the pipe. Any cli tool has the same option. There were plenty of tools in the 90's and early 00's that work like this because of how they were coded/compiled.