# LibTmux\New-TmuxServer

- **Package:** LibTmux
- **Language:** PowerShell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-powershell/blob/b06c64f844f3173de66b187eaeaf3915814318c6/src/LibTmux.PowerShell/NewTmuxServerCommand.cs#L6
- **Page:** https://libtmux.org/en/powershell/latest/reference/libtmux-new-tmuxserver/

```
Name (default):
New-TmuxServer
    [-SocketName <System.String>]
    [-TmuxBinaryPath <System.String>]
    [-ConfigurationFile <System.String>]
    [<CommonParameters>]

Path:
New-TmuxServer
    -SocketPath <System.String>
    [-TmuxBinaryPath <System.String>]
    [-ConfigurationFile <System.String>]
    [<CommonParameters>]
```

Construct a tmux endpoint handle without contacting it.

Choose a socket name or absolute socket path. Construction performs no tmux I/O and does not start or own a daemon. A later command explicitly acquires data or changes tmux. Omitting both socket selectors uses the core default endpoint.

### Notes

The returned [`LibTmux.Server`](/en/csharp/latest/reference/libtmux-server/) is unmaterialized. TmuxBinaryPath and [`ConfigurationFile`](/en/csharp/latest/reference/libtmux-serverconnectionoptions-configurationfile/) affect subsequent operations; construction does not execute them.

## Command details

- **Command type:** [`cmdlet`](/en/powershell/latest/reference/glossary/#cmdlet)
- **Default parameter set:** Name
- **Positional binding:** Enabled.
- **Outputs:** `LibTmux.Server`

Related APIs:

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

## Examples

Example 1

Construct a handle for the existing socket identified by $SocketPath.

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

```powershell
LibTmux\New-TmuxServer -SocketPath $SocketPath
```

## Parameters

- `SocketName` (`System.String`): The tmux socket name. (for `Name`)
  Optional. Named parameter. Does not accept pipeline input. [`ValidateNotNullOrEmpty()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnulloremptyattribute?view=powershellsdk-7.4.0).
- `TmuxBinaryPath` (`System.String`): The tmux executable used by subsequent operations.
  Optional. Named parameter. Does not accept pipeline input. [`ValidateNotNullOrEmpty()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnulloremptyattribute?view=powershellsdk-7.4.0).
- `ConfigurationFile` (`System.String`): The configuration used if a later operation starts tmux.
  Optional. Named parameter. Does not accept pipeline input. [`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`.
- `SocketPath` (`System.String`): The absolute socket path. (for `Path`)
  Required. Named parameter. Does not accept pipeline input. [`ValidateNotNullOrEmpty()`](https://learn.microsoft.com/dotnet/api/system.management.automation.validatenotnulloremptyattribute?view=powershellsdk-7.4.0).

## Returns

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

## In other ports

### A tmux server

- Julia: [`LibTmux.Server`](/en/julia/latest/reference/libtmux-server/) (struct). `Server` describes an endpoint without contacting tmux. Read its hierarchy with `snapshot`.
- Python: [`libtmux.Server`](/en/py/latest/reference/libtmux-server/) (class)
- Ruby: [`LibTmux::Server`](/en/ruby/latest/reference/libtmux-server/) (class)
- Lua: [`libtmux.Server`](/en/lua/latest/reference/libtmux-server/) (class)
- TypeScript: [`server.Server`](/en/ts/latest/reference/server-server/) (class)
- Rust: [`server.Server`](/en/rs/latest/reference/server-server/) (struct)
- Go: [`tmux.Server`](/en/go/latest/reference/tmux-server/) (struct)
- Java: [`io.github.libtmux.Server.Server`](/en/java/latest/reference/io-github-libtmux-server-server/) (class)
- C#: [`LibTmux.Server`](/en/csharp/latest/reference/libtmux-server/) (class)
- C++: [`libtmux::Server`](/en/cxx/latest/reference/libtmux-server/) (class)
- Swift: [`Server`](/en/swift/latest/reference/server/) (struct)
- Kotlin: [`io.github.libtmux.kotlin.Server`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-server/) (class)
- Scala: [`io.github.libtmux.scaladsl.Server`](/en/scala/latest/reference/io-github-libtmux-scaladsl-server/) (typealias)
- F#: [`LibTmux.FSharp.Server`](/en/fsharp/latest/reference/libtmux-fsharp-server/) (module). This F# module provides functions over the shared .NET `LibTmux.Server` type.
