# LibTmux.ServerAccessRequest.ToCommand

- **Module:** LibTmux.ServerAccessRequest
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Requests/ServerAccessRequest.cs#L66
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-serveraccessrequest-tocommand/

```
LibTmux.ServerAccessRequest.ToCommand(server: Server) -> TmuxCommand
```

Returns an access request as one tmux command.

The command itself arrived in tmux 3.3, so batching does not soften the
refusal below that: an older server has nothing to send it to.

## Parameters

- `server` (Server): The server whose access is changed.

## Returns

The command, ready to add to a <see cref="TmuxChain" />.

## Raises

- `ArgumentNullException`: <paramref name="server" /> is null.
- `TmuxVersionTooLowException`: tmux is older than 3.3.
