1

Using Windows 10 Home or Pro connecting to Microsoft Windows Server 2019 Datacenter for remote desktops and sessions, any way to connect to this only for using PowerShell? I don't need to load all the extra resources, services and visual elements.

Tried connecting with -console using mstsc but its still loading pretty much everything.

Is there a tool that I am missing here?

2 Answers 2

0

There are alternate mechanisms, if you only want to use the terminal.

You could install OpenSSH on the server using Settings > Apps > Apps & Features > Optional Features. Find "OpenSSH Server", then click Install. For more information see Install OpenSSH.

As client, OpenSSH Client is available to install on Windows 10 build 1809 and later. The client installation is the same as above, except that the feature name is "OpenSSH Client".

1
  • Thanks, pretty sure I am blocked on port 22 for security purposes. I really only use the powershell (as my limited user) in the remote desktop and the IP I am assigned in a session is authorized to do what I need. I may need to just contact the Admins, I appreciate your response harrymc.
    – Caleb
    Apr 29, 2021 at 15:31
0

For command line based remote access on Windows there is PowerShell remoting. As long as the computer is part of the domain Kerberos is used to securely authenticate against the remote system. It uses WinRM as a means to connect to the target. By default only users with admin permissions on the remote system can authenticate against the default PowerShell remoting endpoint. You can add more endpoints that grant other users access. I recommend using GPOs to standardize the firewall and WinRM configuration across your environment.

Please note that the remote authentication is treated as a network login which restricts your session to the remote system. If you try to access other systems from there you will encounter the so called double hop problem that can be solved via delegation but needs to be implemented properly.

PowerShell provides the Enter-PSSession cmdlet to connect to a remote system interactively and New-PSSession to create a connection object that can be used with the -PSSession parameter of a lot of cmdlets and it also supports one-to-many connections for bulk operations.

PowerShell remoting is different from a regular SSH connection - instead of maintaining a persistent connection to the remote system, PS remoting takes your command, runs it on the remote system and serializes its output before it's deserialized locally on the source machine. That means text editors like vim cannot be run via WinRM based PS remoting and methods on PS objects are lost. In newer versions of PowerShell, connection negotiation and data transport is also supported with SSH instead of WinRM, but requires additional configuration.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .