How can I get a list of all open named pipes in Windows? How can I get a list of all open named pipes in Windows? windows windows

How can I get a list of all open named pipes in Windows?


You can view these with Process Explorer from sysinternals. Use the "Find -> Find Handle or DLL..." option and enter the pattern "\Device\NamedPipe\". It will show you which processes have which pipes open.


In the Windows Powershell console, type

[System.IO.Directory]::GetFiles("\\.\\pipe\\")

If your OS version is greater than Windows 7, you can also type
get-childitem \\.\pipe\

This returns a list of objects. If you want the name only:

(get-childitem \\.\pipe\).FullName

(The second example \\.\pipe\ does not work in Powershell 7, but the first example does)


Try the following instead:

String[] listOfPipes = System.IO.Directory.GetFiles(@"\\.\pipe\");