Skip to main content

PowerShell

With PowerShell you can start PowerShell consoles on the local computer or connect to remote computers via PowerShell Remoting. The integration of PowerShell with NETworkManger supports tabs and profiles for hosts. The connection can be established via a profile (double-click, Enter key or right-click Connect) or directly via the connection dialog.

info

PowerShell is a command-line shell and scripting language developed by Microsoft for automating administrative tasks and managing system configurations. It provides a robust set of built-in commands and access to .NET Framework objects, allowing for efficient system administration and automation. PowerShell uses a verb-noun syntax, allowing users to perform a wide range of operations by executing simple and powerful commands.

note

Windows PowerShell and PowerShell Core are supported. Indructions for installing PowerShell Core can be found on the official website.

tip

Windows Subsystem for Linux (WSL) can be used in PowerShell by passing the following command to the PowerShell console:

wsl -d <DISTRIBUTION>

See FAQ > How to use Windows Subsystem for Linux (WSL) in PowerShell? for more information.

warning

If Windows Terminal is installed, change the Default terminal application in the settings of Windows Terminal to Windows Console Host instead of Windows Terminal to use PowerShell in NETworkManager.

PowerShell

note

Right-click on the tab will open the context menu with the following options:

  • Reconnect - Restart the PowerShell console (and reconnect to the remote computer).
  • Resize - Resize the PowerShell console to the current view size (if connected).

Connect

Remote console

Connect to a remote computer via PowerShell Remoting.

Type: Boolean

Default: False

Host

Host name or IP address of the remote computer.

Type: String

Default: Empty

Example:

  • server-01.borntoberoot.net
  • 10.0.0.10
note

Only available if Remote console is enabled.

Command

Command to execute when the PowerShell console is started locally.

Type: String

Default: Settings > Command

Example: Set-Location ~; Get-ChildItem

note

Only available if Remote console is disabled.

tip

Use wsl -d <DISTRIBUTION> to connect to Windows Subsystem for Linux.

Additional command line

Additional command line arguments to pass to the PowerShell console when it is started.

Type: String

Default: Settings > Additional command line

Execution policy

Execution policy of the PowerShell console when it is started.

Type: NETworkManager.Models.PowerShell.ExecutionPolicy

Default: Settings > Execution policy

Possible values:

  • Restricted
  • AllSigned
  • RemoteSigned
  • Unrestricted
  • Bypass

Profile

Remote console

Connect to a remote computer via PowerShell Remoting.

Type: Boolean

Default: Enabled

Inherit host from general

Inherit the host from the general settings.

Type: Boolean

Default: Enabled

note

If this option is enabled, the Host is overwritten by the host from the general settings and the Host is disabled.

Host

Host name or IP address of the remote computer.

Type: String

Example:

  • server-01.borntoberoot.net
  • 10.0.0.10
note

Only available if Remote console is enabled.

Command

Command to execute when the PowerShell console is started locally.

Type: String

Default: Empty

Example: Set-Location ~; Get-ChildItem

note

Only available if Remote console is disabled.

tip

Use wsl -d <DISTRIBUTION> to connect to Windows Subsystem for Linux.

Additional command line

Additional command line arguments to pass to the PowerShell console when it is started.

Type: String

Default: Empty

Execution policy

Execution policy of the PowerShell console when it is started.

Type: NETworkManager.Models.PowerShell.ExecutionPolicy

Default: RemoteSigned

Possible values:

  • Restricted
  • AllSigned
  • RemoteSigned
  • Unrestricted
  • Bypass

Group

Command

Command to execute when the PowerShell console is started locally.

Type: String

Default: Empty

Example: Set-Location ~; Get-ChildItem

tip

Use wsl -d <DISTRIBUTION> to connect to Windows Subsystem for Linux.

Additional command line

Additional command line arguments to pass to the PowerShell console when it is started.

Type: String

Default: Empty

Execution policy

Execution policy of the PowerShell console when it is started.

Type: NETworkManager.Models.PowerShell.ExecutionPolicy

Default: RemoteSigned

Possible values:

  • Restricted
  • AllSigned
  • RemoteSigned
  • Unrestricted
  • Bypass

Settings

File path

Path to the PowerShell console.

Type: String

Default: %ProgramFiles%\PowerShell\7\pwsh.exe, %ProgramFiles(x86)%\PowerShell\7\pwsh.exe or %windir%\System32\WindowsPowerShell\v1.0\powershell.exe

Example:

  • C:\Program Files\PowerShell\7\pwsh.exe
note

The Configure button opens the PowerShell console to configure it.

Command

Default command to execute when the PowerShell console is started locally.

Type: String

Default: Set-Location ~

Example: Set-Location ~; Get-ChildItem

tip

Use wsl -d <DISTRIBUTION> to connect to Windows Subsystem for Linux.

Additional command line

Default additional command line arguments to pass to the PowerShell console when it is started.

Type: String

Default: Empty

Execution policy

Default execution policy of the PowerShell console when it is started.

Type: NETworkManager.Models.PowerShell.ExecutionPolicy

Default: RemoteSigned

Possible values:

  • Restricted
  • AllSigned
  • RemoteSigned
  • Unrestricted
  • Bypass