Shared server guidance · Question & answer

Should I use CMD, PowerShell or Windows Terminal for server work?

CMD and PowerShell can both launch the OpenSSH client. Windows Terminal hosts command-line sessions; the selected profile determines which shell interprets your command. After SSH connects, the server chooses the remote shell.

BeginnerWindows 11 with Microsoft OpenSSH Client; Windows PowerShell 5.1 or PowerShell 7 as labelledLinux VPS and dedicated servers where a remote Linux command is shown
Go to the answer

Instructions

1. Identify the active shell

Open a PowerShell profile for PowerShell cmdlets, or a Command Prompt profile for batch syntax. A terminal tab title can be customised, so confirm the shell before copying examples.

Local Windows PowerShell
$PSVersionTable.PSVersion

A version object identifies a running PowerShell session.

Local Windows CMD
ver

CMD displays the local Windows version. This does not query your server.

2. Use the shared SSH client

A simple SSH invocation is identical in both shells. Replace the example address and account with the connection details supplied for your server.

Local Windows PowerShell
ssh adminuser@203.0.113.10

This opens a remote session after host verification and successful authentication. The same command works in CMD.

3. Keep shell syntax separate

PowerShell variables, CMD variables and Linux shell variables have different rules. Once connected to Linux, follow examples labelled Remote Linux shell. Windows-specific cmdlets are not automatically available there.

Check the result

  • The local shell version is identified before connection.
  • After connection, the remote prompt belongs to the intended server and account.

Troubleshooting

Get-Service is not recognised after SSH
You may be in a Linux shell. Use the matching Linux service command or explicitly connect to a Windows PowerShell endpoint.
A CMD example prints %USERPROFILE% literally
The example was entered into PowerShell. Use the separately labelled PowerShell equivalent.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.