# LibTmux\Get-TmuxPane

- **Package:** LibTmux
- **Language:** PowerShell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-powershell/blob/b06c64f844f3173de66b187eaeaf3915814318c6/src/LibTmux.PowerShell/GetTmuxPaneCommand.cs#L7
- **Page:** https://libtmux.org/en/powershell/latest/reference/libtmux-get-tmuxpane/

tmux command: [`list-panes`](/en/tmux/latest/manual/list-panes/)

```
Server (default):
Get-TmuxPane
    [-Server] <LibTmux.Server>
    [-Id <System.String>]
    [<CommonParameters>]

Session:
Get-TmuxPane
    [-Session] <LibTmux.Session>
    [-Id <System.String>]
    [<CommonParameters>]

Window:
Get-TmuxPane
    [-Window] <LibTmux.Window>
    [-Id <System.String>]
    [<CommonParameters>]
```

Read panes from a server, session or window.

Acquire panes from the native owning object. Id is an ordinal literal selector. Linked windows can expose multiple contextual placements of one physical pane. Use native [`Where-Object`](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/where-object?view=powershell-7.4) over the returned captured properties for local selection.

### Notes

[`CurrentCommand`](/en/csharp/latest/reference/libtmux-pane-currentcommand/) and [`CurrentPath`](/en/csharp/latest/reference/libtmux-pane-currentpath/) read captured data without I/O. Zero results emit nothing; one emits one object; many emit separate objects. Use @() for a stable array.

## Command details

- **Command type:** [`cmdlet`](/en/powershell/latest/reference/glossary/#cmdlet)
- **Default parameter set:** Server
- **Positional binding:** Enabled.
- **Pipeline inputs:** `LibTmux.Server`: Native pipeline type for this command.; `LibTmux.Session`: Native pipeline type for this command.; `LibTmux.Window`: Native pipeline type for this command.
- **Outputs:** `LibTmux.Pane`

Related APIs:

- [Task guide](https://github.com/libtmux/libtmux-powershell/blob/b06c64f844f3173de66b187eaeaf3915814318c6/docs/read.md)

## Examples

Example 1

List panes on the existing server identified by $SocketPath.

[Source example](https://github.com/libtmux/libtmux-powershell/blob/b06c64f844f3173de66b187eaeaf3915814318c6/docs/reference/LibTmux/Get-TmuxPane.md).

```powershell
LibTmux\New-TmuxServer -SocketPath $SocketPath | LibTmux\Get-TmuxPane
```

## Parameters

- `Server` (`LibTmux.Server`): The server whose panes are read. (for `Server`)
  Required. Position 0. Accepts pipeline input by value. [`ValidateNotNull()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnullattribute?view=powershellsdk-7.4.0).
- `Id` (`System.String`): An ordinal, literal pane identifier selector.
  Optional. Named parameter. Does not accept pipeline input. [`ArgumentCompleter("LibTmux.PowerShell.PaneSelectorCompleter")`](https://learn.microsoft.com/dotnet/api/system.management.automation.argumentcompleterattribute?view=powershellsdk-7.4.0). [`ValidateNotNullOrEmpty()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnulloremptyattribute?view=powershellsdk-7.4.0).
- `Verbose` (`System.Management.Automation.SwitchParameter`): Display verbose messages produced by this command.
  Optional. Named parameter. Switch parameter. Common parameter. Does not accept pipeline input. Aliases: `vb`.
- `Debug` (`System.Management.Automation.SwitchParameter`): Display debug messages produced by this command.
  Optional. Named parameter. Switch parameter. Common parameter. Does not accept pipeline input. Aliases: `db`.
- `ErrorAction` (`System.Management.Automation.ActionPreference`): Choose how this command responds to non-terminating errors.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `ea`.
- `WarningAction` (`System.Management.Automation.ActionPreference`): Choose how this command responds to warning messages.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `wa`.
- `InformationAction` (`System.Management.Automation.ActionPreference`): Choose how this command handles information messages.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `infa`.
- `ProgressAction` (`System.Management.Automation.ActionPreference`): Choose how this command handles progress updates.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `proga`.
- `ErrorVariable` (`System.String`): Store the command's error records in the named variable.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `ev`.
- `WarningVariable` (`System.String`): Store the command's warning records in the named variable.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `wv`.
- `InformationVariable` (`System.String`): Store the command's information records in the named variable.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `iv`.
- `OutVariable` (`System.String`): Save output in the named variable while passing it down the pipeline.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `ov`.
- `OutBuffer` (`System.Int32`): Buffer output before passing it to the next pipeline command.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `ob`.
- `PipelineVariable` (`System.String`): Make the most recent output object available through a named variable within the pipeline.
  Optional. Named parameter. Common parameter. Does not accept pipeline input. Aliases: `pv`.
- `Session` (`LibTmux.Session`): The session whose panes are read. (for `Session`)
  Required. Position 0. Accepts pipeline input by value. [`ValidateNotNull()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnullattribute?view=powershellsdk-7.4.0).
- `Window` (`LibTmux.Window`): The window whose panes are read. (for `Window`)
  Required. Position 0. Accepts pipeline input by value. [`ValidateNotNull()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnullattribute?view=powershellsdk-7.4.0).

## Returns

`LibTmux.Pane`: Native pipeline type for this command.

## In other ports

### A tmux pane

- Julia: [`LibTmux.PaneSnapshot`](/en/julia/latest/reference/libtmux-panesnapshot/) (struct). `PaneSnapshot` holds captured pane data. Actions use its `PaneRef`; `PaneOccurrence` adds a window placement in a session.
- Python: [`libtmux.Pane`](/en/py/latest/reference/libtmux-pane/) (class)
- Ruby: [`LibTmux::Pane`](/en/ruby/latest/reference/libtmux-pane-14z6/) (class)
- Lua: [`libtmux.Pane`](/en/lua/latest/reference/libtmux-pane/) (class)
- TypeScript: [`pane.Pane`](/en/ts/latest/reference/pane-pane/) (class)
- Rust: [`pane.Pane`](/en/rs/latest/reference/pane-pane/) (struct)
- Go: [`tmux.Pane`](/en/go/latest/reference/tmux-pane/) (struct)
- Java: [`io.github.libtmux.Pane.Pane`](/en/java/latest/reference/io-github-libtmux-pane-pane/) (class)
- C#: [`LibTmux.Pane`](/en/csharp/latest/reference/libtmux-pane/) (class)
- C++: [`libtmux::Pane`](/en/cxx/latest/reference/libtmux-pane/) (class)
- Swift: [`Pane`](/en/swift/latest/reference/pane/) (struct)
- Kotlin: [`io.github.libtmux.kotlin.Pane`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-pane/) (class)
- Scala: [`io.github.libtmux.scaladsl.Pane`](/en/scala/latest/reference/io-github-libtmux-scaladsl-pane/) (typealias)
- F#: [`LibTmux.FSharp.Pane`](/en/fsharp/latest/reference/libtmux-fsharp-pane/) (module). This F# module reads captured fields and starts explicit operations on the shared .NET `LibTmux.Pane` type.

### List a window's panes

- Julia: [`LibTmux.panes`](/en/julia/latest/reference/libtmux-panes/) (function). `panes` with a captured `WindowSnapshot` reads panes in that window; missing coverage is an error.
- Python: [`libtmux.Window.panes`](/en/py/latest/reference/libtmux-window-panes/) (property)
- Ruby: [`LibTmux::Window#list_panes`](/en/ruby/latest/reference/libtmux-window-list_panes/) (method)
- TypeScript: [`window.Window.panes`](/en/ts/latest/reference/window-window-panes/) (method)
- Rust: [`window.Window.panes`](/en/rs/latest/reference/window-window-panes/) (method)
- Go: [`tmux.Window.Panes`](/en/go/latest/reference/tmux-window-panes/) (method)
- Java: [`io.github.libtmux.Window.Window.panes`](/en/java/latest/reference/io-github-libtmux-window-window-panes/) (method)
- C#: [`LibTmux.Window.Panes`](/en/csharp/latest/reference/libtmux-window-panes/) (property)
- C++: [`libtmux::Window::panes`](/en/cxx/latest/reference/libtmux-window-panes/) (method)
- Swift: [`Snapshot.panes(of:)`](/en/swift/latest/reference/snapshot-panes(of-)/) (method)
- Kotlin: [`io.github.libtmux.kotlin.Window.panes`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-window-panes/) (property)
- Scala: [`io.github.libtmux.scaladsl.Window.panes`](/en/scala/latest/reference/io-github-libtmux-scaladsl-window-panes/) (method)
- F#: [`LibTmux.FSharp.Window.panes`](/en/fsharp/latest/reference/libtmux-fsharp-window-panes/) (function). Builds a deferred pane query from one `LibTmux.Window` and its server. `Query.list` acquires panes scoped to that window ID.

### List a session's panes

- Python: [`libtmux.Session.panes`](/en/py/latest/reference/libtmux-session-panes/) (property)
- Ruby: [`LibTmux::Session#list_panes`](/en/ruby/latest/reference/libtmux-session-list_panes/) (method)
- TypeScript: [`session.Session.panes`](/en/ts/latest/reference/session-session-panes/) (method)
- Rust: [`session.Session.panes`](/en/rs/latest/reference/session-session-panes/) (method)
- Go: [`tmux.Session.Panes`](/en/go/latest/reference/tmux-session-panes/) (method)
- C#: [`LibTmux.Session.Panes`](/en/csharp/latest/reference/libtmux-session-panes/) (property)
- C++: [`libtmux::Session::panes`](/en/cxx/latest/reference/libtmux-session-panes/) (method)
- Swift: [`Snapshot.panes(of:)`](/en/swift/latest/reference/snapshot-panes(of-)/) (method)
- F#: [`LibTmux.FSharp.Session.panes`](/en/fsharp/latest/reference/libtmux-fsharp-session-panes/) (function). Builds a deferred pane query from one `LibTmux.Session` and its server. `Query.list` acquires panes across that session’s windows.

### List the server's panes

- Julia: [`LibTmux.panes`](/en/julia/latest/reference/libtmux-panes/) (function). `panes` with a `Snapshot` reads every captured physical pane. Use `paneoccurrences` for session placements.
- Python: [`libtmux.Server.panes`](/en/py/latest/reference/libtmux-server-panes/) (property)
- Ruby: [`LibTmux::Server#list_panes`](/en/ruby/latest/reference/libtmux-server-list_panes/) (method)
- Lua: [`libtmux.Snapshot.panes`](/en/lua/latest/reference/libtmux-snapshot-panes/) (attribute)
- TypeScript: [`server.Server.panes`](/en/ts/latest/reference/server-server-panes/) (method)
- Rust: [`server.Server.panes`](/en/rs/latest/reference/server-server-panes/) (method)
- Go: [`tmux.Server.Panes`](/en/go/latest/reference/tmux-server-panes/) (method)
- Java: [`io.github.libtmux.Server.Server.panes`](/en/java/latest/reference/io-github-libtmux-server-server-panes/) (method)
- C#: [`LibTmux.Server.Panes`](/en/csharp/latest/reference/libtmux-server-panes/) (property)
- C++: [`libtmux::Server::panes`](/en/cxx/latest/reference/libtmux-server-panes/) (method)
- Swift: [`Server.panes()`](/en/swift/latest/reference/server-panes()/) (method)
- Kotlin: [`io.github.libtmux.kotlin.Server.panes`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-server-panes/) (method)
- Scala: [`io.github.libtmux.scaladsl.Server.panes`](/en/scala/latest/reference/io-github-libtmux-scaladsl-server-panes/) (method)
- F#: [`LibTmux.FSharp.Server.panes`](/en/fsharp/latest/reference/libtmux-fsharp-server-panes/) (function). Builds a deferred pane query on the shared .NET `LibTmux.Server`. `Query.list` acquires panes across that server.
