Microsoft announced SSH availability using PowerShell in Windows 10. There are other third party solutions, one being Posh-SSH.

To use Posh-SSH in PowerShell you first have to install the Module. I did the following steps on Windows Server 2016 Datacenter and worked well.

To install Posh-SSH we run the following command:

Find-Module PoSH-SSH
PowerShellGet will ask if you want to install the NuGet provider. Say Yes (Y)

Once it has completed the download, please go ahead and install running the following command:

Install-Module Posh-SSH
Install only takes a few seconds, but do trust the repository in the process.

Once complete the following command will list you all available functions.

Get-Command -Module Posh-SSH

We can now create a basic SSH session with the following:

New-SSHSession -ComputerName 192.168.1.1 -Credential(Get-Credential)

It will prompt if you would like to Trust the fingerprint, say Yes (Y)

Once connected you can invoke commands

Invoke-SSHCommand -Index 0 -Command "yourcommand"

Where -Index 0 is your SSH Session ID