# LibTmux.PsmuxServer.GetWindowsAsync

- **Module:** LibTmux.PsmuxServer
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Psmux/PsmuxServer.cs#L113
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-psmuxserver-getwindowsasync/

```
LibTmux.PsmuxServer.GetWindowsAsync(cancellationToken: CancellationToken) -> Task<IReadOnlyList<PsmuxWindow>>
```

Reads every window in the sole session.

## Parameters

- `cancellationToken` (CancellationToken): Cancels the psmux query.

## Returns

Current immutable window observations.

## Raises

- `InvalidOperationException`: The selected namespace has no live session.
- `StaleServerGenerationException`: The sole session was replaced after this server was connected.
- `NotSupportedException`: The selected namespace contains more than one session.
- `LibTmuxException`: The verified client could not complete the query.
